/*
 * Copyright 2013-2016 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.cloudfoundry.client.v2.applications;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Singular;
import lombok.ToString;
import org.cloudfoundry.client.Validatable;
import org.cloudfoundry.client.ValidationResult;
import org.cloudfoundry.client.v2.InFilterParameter;
import org.cloudfoundry.client.v2.PaginatedRequest;

import java.util.List;

/**
 * The request payload for the List all Routes for the Application operation
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public final class ListApplicationRoutesRequest extends PaginatedRequest implements Validatable {

    /**
     * The domain ids
     *
     * @param domainIds the domain ids
     * @return the domain ids
     */
    @Getter(onMethod = @__(@InFilterParameter("domain_guid")))
    private final List<String> domainIds;

    /**
     * The hosts
     *
     * @param hosts the hosts
     * @return the hosts
     */
    @Getter(onMethod = @__(@InFilterParameter("host")))
    private final List<String> hosts;

    /**
     * The id
     *
     * @param id the id
     * @return the id
     */
    @Getter(onMethod = @__(@JsonIgnore))
    private final String id;

    /**
     * The organization ids
     *
     * @param organizationIds the organization ids
     * @return the organization ids
     */
    @Getter(onMethod = @__(@InFilterParameter("organization_guid")))
    private final List<String> organizationIds;

    /**
     * The paths
     *
     * @param paths the paths
     * @return the paths
     */
    @Getter(onMethod = @__(@InFilterParameter("path")))
    private final List<String> paths;

    /**
     * The ports
     *
     * @param paths the ports
     * @return the ports
     */
    @Getter(onMethod = @__(@InFilterParameter("port")))
    private final List<Integer> ports;

    @Builder
    ListApplicationRoutesRequest(OrderDirection orderDirection, Integer page, Integer resultsPerPage,
                                 @Singular List<String> domainIds,
                                 String id,
                                 @Singular List<String> hosts,
                                 @Singular List<String> organizationIds,
                                 @Singular List<String> paths,
                                 @Singular List<Integer> ports) {
        super(orderDirection, page, resultsPerPage);
        this.domainIds = domainIds;
        this.id = id;
        this.hosts = hosts;
        this.organizationIds = organizationIds;
        this.paths = paths;
        this.ports = ports;
    }

    @Override
    public ValidationResult isValid() {
        ValidationResult.ValidationResultBuilder builder = ValidationResult.builder();

        if (this.id == null) {
            builder.message("id must be specified");
        }

        return builder.build();
    }

}

@@ -1909,264 +1909,8 @@
 d;%0A%0A
-    /**%0A     * The organization ids%0A     *%0A     * @param organizationIds the organization ids%0A     * @return the organization ids%0A     */%0A    @Getter(onMethod = @__(@InFilterParameter(%22organization_guid%22)))%0A    private final List%3CString%3E organizationIds;%0A%0A
     
@@ -2579,81 +2579,8 @@
 ts,%0A
-                                 @Singular List%3CString%3E organizationIds,%0A
     
@@ -2847,56 +2847,8 @@
 ts;%0A
-        this.organizationIds = organizationIds;%0A
     

Remove OrganizationId from ListApplicationRoutes