Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.huaweicloud.sdk.er.v3.ErMeta Maven / Gradle / Ivy
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