All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huaweicloud.sdk.er.v3.ErMeta Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
package com.huaweicloud.sdk.er.v3;

import com.huaweicloud.sdk.core.TypeCasts;
import com.huaweicloud.sdk.core.http.FieldExistence;
import com.huaweicloud.sdk.core.http.HttpMethod;
import com.huaweicloud.sdk.core.http.HttpRequestDef;
import com.huaweicloud.sdk.core.http.LocationType;
import com.huaweicloud.sdk.er.v3.model.AcceptAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.AcceptAttachmentResponse;
import com.huaweicloud.sdk.er.v3.model.AssociateRouteTableRequest;
import com.huaweicloud.sdk.er.v3.model.AssociateRouteTableResponse;
import com.huaweicloud.sdk.er.v3.model.AssociationRequestBody;
import com.huaweicloud.sdk.er.v3.model.BatchCreateResourceTagsRequest;
import com.huaweicloud.sdk.er.v3.model.BatchCreateResourceTagsResponse;
import com.huaweicloud.sdk.er.v3.model.BatchOperateResourceTagsRequestBody;
import com.huaweicloud.sdk.er.v3.model.ChangeAvailabilityZoneRequest;
import com.huaweicloud.sdk.er.v3.model.ChangeAvailabilityZoneResponse;
import com.huaweicloud.sdk.er.v3.model.CreateEnterpriseRouterRequest;
import com.huaweicloud.sdk.er.v3.model.CreateEnterpriseRouterRequestBody;
import com.huaweicloud.sdk.er.v3.model.CreateEnterpriseRouterResponse;
import com.huaweicloud.sdk.er.v3.model.CreateFlowLogRequest;
import com.huaweicloud.sdk.er.v3.model.CreateFlowLogRequestBody;
import com.huaweicloud.sdk.er.v3.model.CreateFlowLogResponse;
import com.huaweicloud.sdk.er.v3.model.CreateResourceTagRequest;
import com.huaweicloud.sdk.er.v3.model.CreateResourceTagRequestBody;
import com.huaweicloud.sdk.er.v3.model.CreateResourceTagResponse;
import com.huaweicloud.sdk.er.v3.model.CreateRouteRequestBody;
import com.huaweicloud.sdk.er.v3.model.CreateRouteTableRequest;
import com.huaweicloud.sdk.er.v3.model.CreateRouteTableRequestBody;
import com.huaweicloud.sdk.er.v3.model.CreateRouteTableResponse;
import com.huaweicloud.sdk.er.v3.model.CreateStaticRouteRequest;
import com.huaweicloud.sdk.er.v3.model.CreateStaticRouteResponse;
import com.huaweicloud.sdk.er.v3.model.CreateVpcAttachmentBody;
import com.huaweicloud.sdk.er.v3.model.CreateVpcAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.CreateVpcAttachmentResponse;
import com.huaweicloud.sdk.er.v3.model.DeleteEnterpriseRouterRequest;
import com.huaweicloud.sdk.er.v3.model.DeleteEnterpriseRouterResponse;
import com.huaweicloud.sdk.er.v3.model.DeleteFlowLogRequest;
import com.huaweicloud.sdk.er.v3.model.DeleteFlowLogResponse;
import com.huaweicloud.sdk.er.v3.model.DeleteResourceTagRequest;
import com.huaweicloud.sdk.er.v3.model.DeleteResourceTagResponse;
import com.huaweicloud.sdk.er.v3.model.DeleteRouteTableRequest;
import com.huaweicloud.sdk.er.v3.model.DeleteRouteTableResponse;
import com.huaweicloud.sdk.er.v3.model.DeleteStaticRouteRequest;
import com.huaweicloud.sdk.er.v3.model.DeleteStaticRouteResponse;
import com.huaweicloud.sdk.er.v3.model.DeleteVpcAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.DeleteVpcAttachmentResponse;
import com.huaweicloud.sdk.er.v3.model.DisableFlowLogRequest;
import com.huaweicloud.sdk.er.v3.model.DisableFlowLogResponse;
import com.huaweicloud.sdk.er.v3.model.DisablePropagationRequest;
import com.huaweicloud.sdk.er.v3.model.DisablePropagationResponse;
import com.huaweicloud.sdk.er.v3.model.DisassociateRouteTableRequest;
import com.huaweicloud.sdk.er.v3.model.DisassociateRouteTableResponse;
import com.huaweicloud.sdk.er.v3.model.EnableFlowLogRequest;
import com.huaweicloud.sdk.er.v3.model.EnableFlowLogResponse;
import com.huaweicloud.sdk.er.v3.model.EnablePropagationRequest;
import com.huaweicloud.sdk.er.v3.model.EnablePropagationResponse;
import com.huaweicloud.sdk.er.v3.model.EnterpriseRouterAZ;
import com.huaweicloud.sdk.er.v3.model.ListAssociationsRequest;
import com.huaweicloud.sdk.er.v3.model.ListAssociationsResponse;
import com.huaweicloud.sdk.er.v3.model.ListAttachmentsRequest;
import com.huaweicloud.sdk.er.v3.model.ListAttachmentsResponse;
import com.huaweicloud.sdk.er.v3.model.ListAvailabilityZoneRequest;
import com.huaweicloud.sdk.er.v3.model.ListAvailabilityZoneResponse;
import com.huaweicloud.sdk.er.v3.model.ListEffectiveRoutesRequest;
import com.huaweicloud.sdk.er.v3.model.ListEffectiveRoutesResponse;
import com.huaweicloud.sdk.er.v3.model.ListEnterpriseRoutersRequest;
import com.huaweicloud.sdk.er.v3.model.ListEnterpriseRoutersResponse;
import com.huaweicloud.sdk.er.v3.model.ListFlowLogsRequest;
import com.huaweicloud.sdk.er.v3.model.ListFlowLogsResponse;
import com.huaweicloud.sdk.er.v3.model.ListProjectTagsRequest;
import com.huaweicloud.sdk.er.v3.model.ListProjectTagsResponse;
import com.huaweicloud.sdk.er.v3.model.ListPropagationsRequest;
import com.huaweicloud.sdk.er.v3.model.ListPropagationsResponse;
import com.huaweicloud.sdk.er.v3.model.ListRouteTablesRequest;
import com.huaweicloud.sdk.er.v3.model.ListRouteTablesResponse;
import com.huaweicloud.sdk.er.v3.model.ListStaticRoutesRequest;
import com.huaweicloud.sdk.er.v3.model.ListStaticRoutesResponse;
import com.huaweicloud.sdk.er.v3.model.ListVpcAttachmentsRequest;
import com.huaweicloud.sdk.er.v3.model.ListVpcAttachmentsResponse;
import com.huaweicloud.sdk.er.v3.model.PropagationRequestBody;
import com.huaweicloud.sdk.er.v3.model.RejectAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.RejectAttachmentResponse;
import com.huaweicloud.sdk.er.v3.model.ShowAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.ShowAttachmentResponse;
import com.huaweicloud.sdk.er.v3.model.ShowEnterpriseRouterRequest;
import com.huaweicloud.sdk.er.v3.model.ShowEnterpriseRouterResponse;
import com.huaweicloud.sdk.er.v3.model.ShowFlowLogRequest;
import com.huaweicloud.sdk.er.v3.model.ShowFlowLogResponse;
import com.huaweicloud.sdk.er.v3.model.ShowQuotasRequest;
import com.huaweicloud.sdk.er.v3.model.ShowQuotasResponse;
import com.huaweicloud.sdk.er.v3.model.ShowResourceTagRequest;
import com.huaweicloud.sdk.er.v3.model.ShowResourceTagResponse;
import com.huaweicloud.sdk.er.v3.model.ShowRouteTableRequest;
import com.huaweicloud.sdk.er.v3.model.ShowRouteTableResponse;
import com.huaweicloud.sdk.er.v3.model.ShowStaticRouteRequest;
import com.huaweicloud.sdk.er.v3.model.ShowStaticRouteResponse;
import com.huaweicloud.sdk.er.v3.model.ShowVpcAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.ShowVpcAttachmentResponse;
import com.huaweicloud.sdk.er.v3.model.UpdateAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.UpdateAttachmentRequestBody;
import com.huaweicloud.sdk.er.v3.model.UpdateAttachmentResponse;
import com.huaweicloud.sdk.er.v3.model.UpdateEnterpriseRouterRequest;
import com.huaweicloud.sdk.er.v3.model.UpdateEnterpriseRouterRequestBody;
import com.huaweicloud.sdk.er.v3.model.UpdateEnterpriseRouterResponse;
import com.huaweicloud.sdk.er.v3.model.UpdateFlowLogRequest;
import com.huaweicloud.sdk.er.v3.model.UpdateFlowLogRequestBody;
import com.huaweicloud.sdk.er.v3.model.UpdateFlowLogResponse;
import com.huaweicloud.sdk.er.v3.model.UpdateRouteRequestBody;
import com.huaweicloud.sdk.er.v3.model.UpdateRouteTableRequest;
import com.huaweicloud.sdk.er.v3.model.UpdateRouteTableRequestBody;
import com.huaweicloud.sdk.er.v3.model.UpdateRouteTableResponse;
import com.huaweicloud.sdk.er.v3.model.UpdateStaticRouteRequest;
import com.huaweicloud.sdk.er.v3.model.UpdateStaticRouteResponse;
import com.huaweicloud.sdk.er.v3.model.UpdateVpcAttachmentRequest;
import com.huaweicloud.sdk.er.v3.model.UpdateVpcAttachmentRequestBody;
import com.huaweicloud.sdk.er.v3.model.UpdateVpcAttachmentResponse;

import java.util.List;

@SuppressWarnings("unchecked")
public class ErMeta {

    public static final HttpRequestDef associateRouteTable =
        genForassociateRouteTable();

    private static HttpRequestDef genForassociateRouteTable() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, AssociateRouteTableRequest.class, AssociateRouteTableResponse.class)
                .withName("AssociateRouteTable")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/associate")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(AssociateRouteTableRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(AssociateRouteTableRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(AssociateRouteTableRequest::getXClientToken, (req, v) -> {
                req.setXClientToken(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(AssociationRequestBody.class),
            f -> f.withMarshaller(AssociateRouteTableRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        builder.withResponseField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(AssociateRouteTableResponse::getXClientToken,
                AssociateRouteTableResponse::setXClientToken));
        return builder.build();
    }

    public static final HttpRequestDef disassociateRouteTable =
        genFordisassociateRouteTable();

    private static HttpRequestDef genFordisassociateRouteTable() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.POST, DisassociateRouteTableRequest.class, DisassociateRouteTableResponse.class)
            .withName("DisassociateRouteTable")
            .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/disassociate")
            .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DisassociateRouteTableRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DisassociateRouteTableRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(AssociationRequestBody.class),
            f -> f.withMarshaller(DisassociateRouteTableRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listAssociations =
        genForlistAssociations();

    private static HttpRequestDef genForlistAssociations() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListAssociationsRequest.class, ListAssociationsResponse.class)
                .withName("ListAssociations")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/associations")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListAssociationsRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListAssociationsRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListAssociationsRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListAssociationsRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("attachment_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAssociationsRequest::getAttachmentId, (req, v) -> {
                req.setAttachmentId(v);
            }));
        builder.>withRequestField("resource_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAssociationsRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));
        builder.>withRequestField("state",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAssociationsRequest::getState, (req, v) -> {
                req.setState(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAssociationsRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAssociationsRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef acceptAttachment =
        genForacceptAttachment();

    private static HttpRequestDef genForacceptAttachment() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, AcceptAttachmentRequest.class, AcceptAttachmentResponse.class)
                .withName("AcceptAttachment")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/attachments/{attachment_id}/accept")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(AcceptAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("attachment_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(AcceptAttachmentRequest::getAttachmentId, (req, v) -> {
                req.setAttachmentId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listAttachments =
        genForlistAttachments();

    private static HttpRequestDef genForlistAttachments() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListAttachmentsRequest.class, ListAttachmentsResponse.class)
                .withName("ListAttachments")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/attachments")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("state",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getState, (req, v) -> {
                req.setState(v);
            }));
        builder.>withRequestField("resource_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));
        builder.>withRequestField("resource_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getResourceId, (req, v) -> {
                req.setResourceId(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListAttachmentsRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef rejectAttachment =
        genForrejectAttachment();

    private static HttpRequestDef genForrejectAttachment() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, RejectAttachmentRequest.class, RejectAttachmentResponse.class)
                .withName("RejectAttachment")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/attachments/{attachment_id}/reject")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(RejectAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("attachment_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(RejectAttachmentRequest::getAttachmentId, (req, v) -> {
                req.setAttachmentId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showAttachment =
        genForshowAttachment();

    private static HttpRequestDef genForshowAttachment() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowAttachmentRequest.class, ShowAttachmentResponse.class)
                .withName("ShowAttachment")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/attachments/{attachment_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("attachment_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowAttachmentRequest::getAttachmentId, (req, v) -> {
                req.setAttachmentId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef updateAttachment =
        genForupdateAttachment();

    private static HttpRequestDef genForupdateAttachment() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.PUT, UpdateAttachmentRequest.class, UpdateAttachmentResponse.class)
                .withName("UpdateAttachment")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/attachments/{attachment_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("attachment_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateAttachmentRequest::getAttachmentId, (req, v) -> {
                req.setAttachmentId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(UpdateAttachmentRequestBody.class),
            f -> f.withMarshaller(UpdateAttachmentRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listAvailabilityZone =
        genForlistAvailabilityZone();

    private static HttpRequestDef genForlistAvailabilityZone() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.GET, ListAvailabilityZoneRequest.class, ListAvailabilityZoneResponse.class)
            .withName("ListAvailabilityZone")
            .withUri("/v3/{project_id}/enterprise-router/availability-zones")
            .withContentType("application/json");

        // requests
        builder.withRequestField("instance_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListAvailabilityZoneRequest::getInstanceId, (req, v) -> {
                req.setInstanceId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef changeAvailabilityZone =
        genForchangeAvailabilityZone();

    private static HttpRequestDef genForchangeAvailabilityZone() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.POST, ChangeAvailabilityZoneRequest.class, ChangeAvailabilityZoneResponse.class)
            .withName("ChangeAvailabilityZone")
            .withUri("/v3/{project_id}/enterprise-router/instances/{er_id}/change-availability-zone-ids")
            .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ChangeAvailabilityZoneRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(EnterpriseRouterAZ.class),
            f -> f.withMarshaller(ChangeAvailabilityZoneRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef createEnterpriseRouter =
        genForcreateEnterpriseRouter();

    private static HttpRequestDef genForcreateEnterpriseRouter() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.POST, CreateEnterpriseRouterRequest.class, CreateEnterpriseRouterResponse.class)
            .withName("CreateEnterpriseRouter")
            .withUri("/v3/{project_id}/enterprise-router/instances")
            .withContentType("application/json");

        // requests
        builder.withRequestField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateEnterpriseRouterRequest::getXClientToken, (req, v) -> {
                req.setXClientToken(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(CreateEnterpriseRouterRequestBody.class),
            f -> f.withMarshaller(CreateEnterpriseRouterRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        builder.withResponseField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(CreateEnterpriseRouterResponse::getXClientToken,
                CreateEnterpriseRouterResponse::setXClientToken));
        return builder.build();
    }

    public static final HttpRequestDef deleteEnterpriseRouter =
        genFordeleteEnterpriseRouter();

    private static HttpRequestDef genFordeleteEnterpriseRouter() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.DELETE, DeleteEnterpriseRouterRequest.class, DeleteEnterpriseRouterResponse.class)
            .withName("DeleteEnterpriseRouter")
            .withUri("/v3/{project_id}/enterprise-router/instances/{er_id}")
            .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteEnterpriseRouterRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listEnterpriseRouters =
        genForlistEnterpriseRouters();

    private static HttpRequestDef genForlistEnterpriseRouters() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.GET, ListEnterpriseRoutersRequest.class, ListEnterpriseRoutersResponse.class)
            .withName("ListEnterpriseRouters")
            .withUri("/v3/{project_id}/enterprise-router/instances")
            .withContentType("application/json");

        // requests
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("enterprise_project_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getEnterpriseProjectId, (req, v) -> {
                req.setEnterpriseProjectId(v);
            }));
        builder.>withRequestField("state",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getState, (req, v) -> {
                req.setState(v);
            }));
        builder.>withRequestField("id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getId, (req, v) -> {
                req.setId(v);
            }));
        builder.>withRequestField("resource_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getResourceId, (req, v) -> {
                req.setResourceId(v);
            }));
        builder.withRequestField("owned_by_self",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Boolean.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getOwnedBySelf, (req, v) -> {
                req.setOwnedBySelf(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEnterpriseRoutersRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showEnterpriseRouter =
        genForshowEnterpriseRouter();

    private static HttpRequestDef genForshowEnterpriseRouter() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.GET, ShowEnterpriseRouterRequest.class, ShowEnterpriseRouterResponse.class)
            .withName("ShowEnterpriseRouter")
            .withUri("/v3/{project_id}/enterprise-router/instances/{er_id}")
            .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowEnterpriseRouterRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef updateEnterpriseRouter =
        genForupdateEnterpriseRouter();

    private static HttpRequestDef genForupdateEnterpriseRouter() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.PUT, UpdateEnterpriseRouterRequest.class, UpdateEnterpriseRouterResponse.class)
            .withName("UpdateEnterpriseRouter")
            .withUri("/v3/{project_id}/enterprise-router/instances/{er_id}")
            .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateEnterpriseRouterRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(UpdateEnterpriseRouterRequestBody.class),
            f -> f.withMarshaller(UpdateEnterpriseRouterRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef createFlowLog =
        genForcreateFlowLog();

    private static HttpRequestDef genForcreateFlowLog() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, CreateFlowLogRequest.class, CreateFlowLogResponse.class)
                .withName("CreateFlowLog")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/flow-logs")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateFlowLogRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateFlowLogRequest::getXClientToken, (req, v) -> {
                req.setXClientToken(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(CreateFlowLogRequestBody.class),
            f -> f.withMarshaller(CreateFlowLogRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        builder.withResponseField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(CreateFlowLogResponse::getXClientToken, CreateFlowLogResponse::setXClientToken));
        return builder.build();
    }

    public static final HttpRequestDef deleteFlowLog =
        genFordeleteFlowLog();

    private static HttpRequestDef genFordeleteFlowLog() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.DELETE, DeleteFlowLogRequest.class, DeleteFlowLogResponse.class)
                .withName("DeleteFlowLog")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteFlowLogRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("flow_log_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteFlowLogRequest::getFlowLogId, (req, v) -> {
                req.setFlowLogId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef disableFlowLog =
        genFordisableFlowLog();

    private static HttpRequestDef genFordisableFlowLog() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, DisableFlowLogRequest.class, DisableFlowLogResponse.class)
                .withName("DisableFlowLog")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id}/disable")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DisableFlowLogRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("flow_log_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DisableFlowLogRequest::getFlowLogId, (req, v) -> {
                req.setFlowLogId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef enableFlowLog =
        genForenableFlowLog();

    private static HttpRequestDef genForenableFlowLog() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, EnableFlowLogRequest.class, EnableFlowLogResponse.class)
                .withName("EnableFlowLog")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id}/enable")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(EnableFlowLogRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("flow_log_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(EnableFlowLogRequest::getFlowLogId, (req, v) -> {
                req.setFlowLogId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listFlowLogs = genForlistFlowLogs();

    private static HttpRequestDef genForlistFlowLogs() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListFlowLogsRequest.class, ListFlowLogsResponse.class)
                .withName("ListFlowLogs")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/flow-logs")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListFlowLogsRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("resource_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(ListFlowLogsRequest.ResourceTypeEnum.class),
            f -> f.withMarshaller(ListFlowLogsRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));
        builder.>withRequestField("resource_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListFlowLogsRequest::getResourceId, (req, v) -> {
                req.setResourceId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListFlowLogsRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListFlowLogsRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListFlowLogsRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListFlowLogsRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showFlowLog = genForshowFlowLog();

    private static HttpRequestDef genForshowFlowLog() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowFlowLogRequest.class, ShowFlowLogResponse.class)
                .withName("ShowFlowLog")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowFlowLogRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("flow_log_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowFlowLogRequest::getFlowLogId, (req, v) -> {
                req.setFlowLogId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef updateFlowLog =
        genForupdateFlowLog();

    private static HttpRequestDef genForupdateFlowLog() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.PUT, UpdateFlowLogRequest.class, UpdateFlowLogResponse.class)
                .withName("UpdateFlowLog")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateFlowLogRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("flow_log_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateFlowLogRequest::getFlowLogId, (req, v) -> {
                req.setFlowLogId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(UpdateFlowLogRequestBody.class),
            f -> f.withMarshaller(UpdateFlowLogRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef disablePropagation =
        genFordisablePropagation();

    private static HttpRequestDef genFordisablePropagation() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, DisablePropagationRequest.class, DisablePropagationResponse.class)
                .withName("DisablePropagation")
                .withUri(
                    "/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/disable-propagations")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DisablePropagationRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DisablePropagationRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(PropagationRequestBody.class),
            f -> f.withMarshaller(DisablePropagationRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef enablePropagation =
        genForenablePropagation();

    private static HttpRequestDef genForenablePropagation() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, EnablePropagationRequest.class, EnablePropagationResponse.class)
                .withName("EnablePropagation")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/enable-propagations")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(EnablePropagationRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(EnablePropagationRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(EnablePropagationRequest::getXClientToken, (req, v) -> {
                req.setXClientToken(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(PropagationRequestBody.class),
            f -> f.withMarshaller(EnablePropagationRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        builder.withResponseField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(EnablePropagationResponse::getXClientToken,
                EnablePropagationResponse::setXClientToken));
        return builder.build();
    }

    public static final HttpRequestDef listPropagations =
        genForlistPropagations();

    private static HttpRequestDef genForlistPropagations() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListPropagationsRequest.class, ListPropagationsResponse.class)
                .withName("ListPropagations")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/propagations")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListPropagationsRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListPropagationsRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListPropagationsRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListPropagationsRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("attachment_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListPropagationsRequest::getAttachmentId, (req, v) -> {
                req.setAttachmentId(v);
            }));
        builder.>withRequestField("resource_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListPropagationsRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));
        builder.>withRequestField("state",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListPropagationsRequest::getState, (req, v) -> {
                req.setState(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListPropagationsRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListPropagationsRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showQuotas = genForshowQuotas();

    private static HttpRequestDef genForshowQuotas() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowQuotasRequest.class, ShowQuotasResponse.class)
                .withName("ShowQuotas")
                .withUri("/v3/{project_id}/enterprise-router/quotas")
                .withContentType("application/json");

        // requests
        builder.>withRequestField("type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ShowQuotasRequest::getType, (req, v) -> {
                req.setType(v);
            }));
        builder.>withRequestField("erId",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ShowQuotasRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.>withRequestField("routeTableId",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ShowQuotasRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.>withRequestField("vpcId",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ShowQuotasRequest::getVpcId, (req, v) -> {
                req.setVpcId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef createStaticRoute =
        genForcreateStaticRoute();

    private static HttpRequestDef genForcreateStaticRoute() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, CreateStaticRouteRequest.class, CreateStaticRouteResponse.class)
                .withName("CreateStaticRoute")
                .withUri("/v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes")
                .withContentType("application/json");

        // requests
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateStaticRouteRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateStaticRouteRequest::getXClientToken, (req, v) -> {
                req.setXClientToken(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(CreateRouteRequestBody.class),
            f -> f.withMarshaller(CreateStaticRouteRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        builder.withResponseField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(CreateStaticRouteResponse::getXClientToken,
                CreateStaticRouteResponse::setXClientToken));
        return builder.build();
    }

    public static final HttpRequestDef deleteStaticRoute =
        genFordeleteStaticRoute();

    private static HttpRequestDef genFordeleteStaticRoute() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.DELETE, DeleteStaticRouteRequest.class, DeleteStaticRouteResponse.class)
                .withName("DeleteStaticRoute")
                .withUri("/v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes/{route_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteStaticRouteRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("route_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteStaticRouteRequest::getRouteId, (req, v) -> {
                req.setRouteId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listEffectiveRoutes =
        genForlistEffectiveRoutes();

    private static HttpRequestDef genForlistEffectiveRoutes() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListEffectiveRoutesRequest.class, ListEffectiveRoutesResponse.class)
                .withName("ListEffectiveRoutes")
                .withUri("/v3/{project_id}/enterprise-router/route-tables/{route_table_id}/routes")
                .withContentType("application/json");

        // requests
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListEffectiveRoutesRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListEffectiveRoutesRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListEffectiveRoutesRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("destination",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEffectiveRoutesRequest::getDestination, (req, v) -> {
                req.setDestination(v);
            }));
        builder.>withRequestField("resource_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListEffectiveRoutesRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listStaticRoutes =
        genForlistStaticRoutes();

    private static HttpRequestDef genForlistStaticRoutes() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListStaticRoutesRequest.class, ListStaticRoutesResponse.class)
                .withName("ListStaticRoutes")
                .withUri("/v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes")
                .withContentType("application/json");

        // requests
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("destination",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getDestination, (req, v) -> {
                req.setDestination(v);
            }));
        builder.>withRequestField("attachment_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getAttachmentId, (req, v) -> {
                req.setAttachmentId(v);
            }));
        builder.>withRequestField("resource_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListStaticRoutesRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showStaticRoute =
        genForshowStaticRoute();

    private static HttpRequestDef genForshowStaticRoute() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowStaticRouteRequest.class, ShowStaticRouteResponse.class)
                .withName("ShowStaticRoute")
                .withUri("/v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes/{route_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowStaticRouteRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("route_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowStaticRouteRequest::getRouteId, (req, v) -> {
                req.setRouteId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef updateStaticRoute =
        genForupdateStaticRoute();

    private static HttpRequestDef genForupdateStaticRoute() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.PUT, UpdateStaticRouteRequest.class, UpdateStaticRouteResponse.class)
                .withName("UpdateStaticRoute")
                .withUri("/v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes/{route_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateStaticRouteRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("route_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateStaticRouteRequest::getRouteId, (req, v) -> {
                req.setRouteId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(UpdateRouteRequestBody.class),
            f -> f.withMarshaller(UpdateStaticRouteRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef createRouteTable =
        genForcreateRouteTable();

    private static HttpRequestDef genForcreateRouteTable() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, CreateRouteTableRequest.class, CreateRouteTableResponse.class)
                .withName("CreateRouteTable")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateRouteTableRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateRouteTableRequest::getXClientToken, (req, v) -> {
                req.setXClientToken(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(CreateRouteTableRequestBody.class),
            f -> f.withMarshaller(CreateRouteTableRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        builder.withResponseField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(CreateRouteTableResponse::getXClientToken,
                CreateRouteTableResponse::setXClientToken));
        return builder.build();
    }

    public static final HttpRequestDef deleteRouteTable =
        genFordeleteRouteTable();

    private static HttpRequestDef genFordeleteRouteTable() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.DELETE, DeleteRouteTableRequest.class, DeleteRouteTableResponse.class)
                .withName("DeleteRouteTable")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteRouteTableRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteRouteTableRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listRouteTables =
        genForlistRouteTables();

    private static HttpRequestDef genForlistRouteTables() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListRouteTablesRequest.class, ListRouteTablesResponse.class)
                .withName("ListRouteTables")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("state",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getState, (req, v) -> {
                req.setState(v);
            }));
        builder.withRequestField("is_default_propagation_table",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Boolean.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getIsDefaultPropagationTable, (req, v) -> {
                req.setIsDefaultPropagationTable(v);
            }));
        builder.withRequestField("is_default_association_table",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Boolean.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getIsDefaultAssociationTable, (req, v) -> {
                req.setIsDefaultAssociationTable(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListRouteTablesRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showRouteTable =
        genForshowRouteTable();

    private static HttpRequestDef genForshowRouteTable() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowRouteTableRequest.class, ShowRouteTableResponse.class)
                .withName("ShowRouteTable")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowRouteTableRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowRouteTableRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef updateRouteTable =
        genForupdateRouteTable();

    private static HttpRequestDef genForupdateRouteTable() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.PUT, UpdateRouteTableRequest.class, UpdateRouteTableResponse.class)
                .withName("UpdateRouteTable")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateRouteTableRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("route_table_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateRouteTableRequest::getRouteTableId, (req, v) -> {
                req.setRouteTableId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(UpdateRouteTableRequestBody.class),
            f -> f.withMarshaller(UpdateRouteTableRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef batchCreateResourceTags =
        genForbatchCreateResourceTags();

    private static HttpRequestDef genForbatchCreateResourceTags() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.POST, BatchCreateResourceTagsRequest.class, BatchCreateResourceTagsResponse.class)
            .withName("BatchCreateResourceTags")
            .withUri("/v3/{project_id}/{resource_type}/{resource_id}/tags/action")
            .withContentType("application/json");

        // requests
        builder.withRequestField("resource_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(BatchCreateResourceTagsRequest::getResourceId, (req, v) -> {
                req.setResourceId(v);
            }));
        builder.withRequestField("resource_type",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(BatchCreateResourceTagsRequest.ResourceTypeEnum.class),
            f -> f.withMarshaller(BatchCreateResourceTagsRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(BatchOperateResourceTagsRequestBody.class),
            f -> f.withMarshaller(BatchCreateResourceTagsRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response
        builder.withResponseField("body",
            LocationType.Body,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(BatchCreateResourceTagsResponse::getBody, (response, data) -> {
                response.setBody(data);
            }));

        return builder.build();
    }

    public static final HttpRequestDef createResourceTag =
        genForcreateResourceTag();

    private static HttpRequestDef genForcreateResourceTag() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, CreateResourceTagRequest.class, CreateResourceTagResponse.class)
                .withName("CreateResourceTag")
                .withUri("/v3/{project_id}/{resource_type}/{resource_id}/tags")
                .withContentType("application/json");

        // requests
        builder.withRequestField("resource_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateResourceTagRequest::getResourceId, (req, v) -> {
                req.setResourceId(v);
            }));
        builder.withRequestField("resource_type",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(CreateResourceTagRequest.ResourceTypeEnum.class),
            f -> f.withMarshaller(CreateResourceTagRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(CreateResourceTagRequestBody.class),
            f -> f.withMarshaller(CreateResourceTagRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response
        builder.withResponseField("body",
            LocationType.Body,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(CreateResourceTagResponse::getBody, (response, data) -> {
                response.setBody(data);
            }));

        return builder.build();
    }

    public static final HttpRequestDef deleteResourceTag =
        genFordeleteResourceTag();

    private static HttpRequestDef genFordeleteResourceTag() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.DELETE, DeleteResourceTagRequest.class, DeleteResourceTagResponse.class)
                .withName("DeleteResourceTag")
                .withUri("/v3/{project_id}/{resource_type}/{resource_id}/tags/{key}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("key",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteResourceTagRequest::getKey, (req, v) -> {
                req.setKey(v);
            }));
        builder.withRequestField("resource_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteResourceTagRequest::getResourceId, (req, v) -> {
                req.setResourceId(v);
            }));
        builder.withRequestField("resource_type",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(DeleteResourceTagRequest.ResourceTypeEnum.class),
            f -> f.withMarshaller(DeleteResourceTagRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));

        // response
        builder.withResponseField("body",
            LocationType.Body,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(DeleteResourceTagResponse::getBody, (response, data) -> {
                response.setBody(data);
            }));

        return builder.build();
    }

    public static final HttpRequestDef listProjectTags =
        genForlistProjectTags();

    private static HttpRequestDef genForlistProjectTags() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListProjectTagsRequest.class, ListProjectTagsResponse.class)
                .withName("ListProjectTags")
                .withUri("/v3/{project_id}/{resource_type}/tags")
                .withContentType("application/json");

        // requests
        builder.withRequestField("resource_type",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(ListProjectTagsRequest.ResourceTypeEnum.class),
            f -> f.withMarshaller(ListProjectTagsRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showResourceTag =
        genForshowResourceTag();

    private static HttpRequestDef genForshowResourceTag() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowResourceTagRequest.class, ShowResourceTagResponse.class)
                .withName("ShowResourceTag")
                .withUri("/v3/{project_id}/{resource_type}/{resource_id}/tags")
                .withContentType("application/json");

        // requests
        builder.withRequestField("resource_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowResourceTagRequest::getResourceId, (req, v) -> {
                req.setResourceId(v);
            }));
        builder.withRequestField("resource_type",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(ShowResourceTagRequest.ResourceTypeEnum.class),
            f -> f.withMarshaller(ShowResourceTagRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef createVpcAttachment =
        genForcreateVpcAttachment();

    private static HttpRequestDef genForcreateVpcAttachment() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, CreateVpcAttachmentRequest.class, CreateVpcAttachmentResponse.class)
                .withName("CreateVpcAttachment")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/vpc-attachments")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateVpcAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(CreateVpcAttachmentRequest::getXClientToken, (req, v) -> {
                req.setXClientToken(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(CreateVpcAttachmentBody.class),
            f -> f.withMarshaller(CreateVpcAttachmentRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        builder.withResponseField("X-Client-Token",
            LocationType.Header,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(CreateVpcAttachmentResponse::getXClientToken,
                CreateVpcAttachmentResponse::setXClientToken));
        return builder.build();
    }

    public static final HttpRequestDef deleteVpcAttachment =
        genFordeleteVpcAttachment();

    private static HttpRequestDef genFordeleteVpcAttachment() {
        // basic
        HttpRequestDef.Builder builder = HttpRequestDef
            .builder(HttpMethod.DELETE, DeleteVpcAttachmentRequest.class, DeleteVpcAttachmentResponse.class)
            .withName("DeleteVpcAttachment")
            .withUri("/v3/{project_id}/enterprise-router/{er_id}/vpc-attachments/{vpc_attachment_id}")
            .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteVpcAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("vpc_attachment_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(DeleteVpcAttachmentRequest::getVpcAttachmentId, (req, v) -> {
                req.setVpcAttachmentId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef listVpcAttachments =
        genForlistVpcAttachments();

    private static HttpRequestDef genForlistVpcAttachments() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListVpcAttachmentsRequest.class, ListVpcAttachmentsResponse.class)
                .withName("ListVpcAttachments")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/vpc-attachments")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("limit",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(Integer.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getLimit, (req, v) -> {
                req.setLimit(v);
            }));
        builder.withRequestField("marker",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getMarker, (req, v) -> {
                req.setMarker(v);
            }));
        builder.>withRequestField("state",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getState, (req, v) -> {
                req.setState(v);
            }));
        builder.>withRequestField("id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getId, (req, v) -> {
                req.setId(v);
            }));
        builder.>withRequestField("sort_key",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getSortKey, (req, v) -> {
                req.setSortKey(v);
            }));
        builder.>withRequestField("sort_dir",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getSortDir, (req, v) -> {
                req.setSortDir(v);
            }));
        builder.>withRequestField("vpc_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            TypeCasts.uncheckedConversion(List.class),
            f -> f.withMarshaller(ListVpcAttachmentsRequest::getVpcId, (req, v) -> {
                req.setVpcId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef showVpcAttachment =
        genForshowVpcAttachment();

    private static HttpRequestDef genForshowVpcAttachment() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowVpcAttachmentRequest.class, ShowVpcAttachmentResponse.class)
                .withName("ShowVpcAttachment")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/vpc-attachments/{vpc_attachment_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowVpcAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("vpc_attachment_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(ShowVpcAttachmentRequest::getVpcAttachmentId, (req, v) -> {
                req.setVpcAttachmentId(v);
            }));

        // response

        return builder.build();
    }

    public static final HttpRequestDef updateVpcAttachment =
        genForupdateVpcAttachment();

    private static HttpRequestDef genForupdateVpcAttachment() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.PUT, UpdateVpcAttachmentRequest.class, UpdateVpcAttachmentResponse.class)
                .withName("UpdateVpcAttachment")
                .withUri("/v3/{project_id}/enterprise-router/{er_id}/vpc-attachments/{vpc_attachment_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("er_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateVpcAttachmentRequest::getErId, (req, v) -> {
                req.setErId(v);
            }));
        builder.withRequestField("vpc_attachment_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(String.class),
            f -> f.withMarshaller(UpdateVpcAttachmentRequest::getVpcAttachmentId, (req, v) -> {
                req.setVpcAttachmentId(v);
            }));
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            TypeCasts.uncheckedConversion(UpdateVpcAttachmentRequestBody.class),
            f -> f.withMarshaller(UpdateVpcAttachmentRequest::getBody, (req, v) -> {
                req.setBody(v);
            }));

        // response

        return builder.build();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy