package com.fr.plugin; import com.fr.plugin.models.MyListSimCardsResponse; 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.gsl.v3.model.*; import java.util.List; @SuppressWarnings("unchecked") public class MyGslMeta { public static final HttpRequestDef listProPricePlans = genForlistProPricePlans(); private static HttpRequestDef genForlistProPricePlans() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.GET, ListProPricePlansRequest.class, ListProPricePlansResponse.class) .withName("ListProPricePlans") .withUri("/v1/price-plans") .withContentType("application/json"); // requests builder.withRequestField("limit", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListProPricePlansRequest::getLimit, (req, v) -> { req.setLimit(v); })); builder.withRequestField("offset", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListProPricePlansRequest::getOffset, (req, v) -> { req.setOffset(v); })); builder.withRequestField("main_search_key", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListProPricePlansRequest::getMainSearchKey, (req, v) -> { req.setMainSearchKey(v); })); builder.withRequestField("flow_total", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListProPricePlansRequest::getFlowTotal, (req, v) -> { req.setFlowTotal(v); })); builder.withRequestField("network_type", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListProPricePlansRequest::getNetworkType, (req, v) -> { req.setNetworkType(v); })); builder.withRequestField("location_type", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListProPricePlansRequest::getLocationType, (req, v) -> { req.setLocationType(v); })); builder.withRequestField("carrier_type", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Integer.class), f -> f.withMarshaller(ListProPricePlansRequest::getCarrierType, (req, v) -> { req.setCarrierType(v); })); builder.withRequestField("country_type", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListProPricePlansRequest::getCountryType, (req, v) -> { req.setCountryType(v); })); // response return builder.build(); } public static final HttpRequestDef deleteRealName = genFordeleteRealName(); private static HttpRequestDef genFordeleteRealName() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, DeleteRealNameRequest.class, DeleteRealNameResponse.class) .withName("DeleteRealName") .withUri("/v1/sim-cards/{sim_card_id}/clear-real-name") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(DeleteRealNameRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); // response return builder.build(); } public static final HttpRequestDef enableSimCard = genForenableSimCard(); private static HttpRequestDef genForenableSimCard() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, EnableSimCardRequest.class, EnableSimCardResponse.class) .withName("EnableSimCard") .withUri("/v1/sim-cards/{sim_card_id}/enable") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(EnableSimCardRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); // response return builder.build(); } public static final HttpRequestDef listSimCards = genForlistSimCards(); private static HttpRequestDef genForlistSimCards() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.GET, ListSimCardsRequest.class, MyListSimCardsResponse.class) .withName("ListSimCards") .withUri("/v1/sim-cards") .withContentType("application/json"); // requests builder.withRequestField("main_search_type", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Integer.class), f -> f.withMarshaller(ListSimCardsRequest::getMainSearchType, (req, v) -> { req.setMainSearchType(v); })); builder.withRequestField("main_search_key", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getMainSearchKey, (req, v) -> { req.setMainSearchKey(v); })); builder.withRequestField("limit", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimCardsRequest::getLimit, (req, v) -> { req.setLimit(v); })); builder.withRequestField("offset", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimCardsRequest::getOffset, (req, v) -> { req.setOffset(v); })); builder.withRequestField("sim_status", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Integer.class), f -> f.withMarshaller(ListSimCardsRequest::getSimStatus, (req, v) -> { req.setSimStatus(v); })); builder.withRequestField("device_status", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Integer.class), f -> f.withMarshaller(ListSimCardsRequest::getDeviceStatus, (req, v) -> { req.setDeviceStatus(v); })); builder.withRequestField("sim_type", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Integer.class), f -> f.withMarshaller(ListSimCardsRequest::getSimType, (req, v) -> { req.setSimType(v); })); builder.withRequestField("order", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(ListSimCardsRequest.OrderEnum.class), f -> f.withMarshaller(ListSimCardsRequest::getOrder, (req, v) -> { req.setOrder(v); })); builder.withRequestField("sort", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(ListSimCardsRequest.SortEnum.class), f -> f.withMarshaller(ListSimCardsRequest::getSort, (req, v) -> { req.setSort(v); })); builder.withRequestField("msisdn", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getMsisdn, (req, v) -> { req.setMsisdn(v); })); builder.withRequestField("customer_attribute1", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getCustomerAttribute1, (req, v) -> { req.setCustomerAttribute1(v); })); builder.withRequestField("customer_attribute2", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getCustomerAttribute2, (req, v) -> { req.setCustomerAttribute2(v); })); builder.withRequestField("customer_attribute3", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getCustomerAttribute3, (req, v) -> { req.setCustomerAttribute3(v); })); builder.withRequestField("customer_attribute4", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getCustomerAttribute4, (req, v) -> { req.setCustomerAttribute4(v); })); builder.withRequestField("customer_attribute5", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getCustomerAttribute5, (req, v) -> { req.setCustomerAttribute5(v); })); builder.withRequestField("customer_attribute6", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimCardsRequest::getCustomerAttribute6, (req, v) -> { req.setCustomerAttribute6(v); })); builder.withRequestField("real_named", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Boolean.class), f -> f.withMarshaller(ListSimCardsRequest::getRealNamed, (req, v) -> { req.setRealNamed(v); })); // response return builder.build(); } public static final HttpRequestDef registerImei = genForregisterImei(); private static HttpRequestDef genForregisterImei() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, RegisterImeiRequest.class, RegisterImeiResponse.class) .withName("RegisterImei") .withUri("/v1/sim-cards/{sim_card_id}/bind-device") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(RegisterImeiRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); builder.withRequestField("body", LocationType.Body, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(RegisterImeiReq.class), f -> f.withMarshaller(RegisterImeiRequest::getBody, (req, v) -> { req.setBody(v); })); // response return builder.build(); } public static final HttpRequestDef resetSimCard = genForresetSimCard(); private static HttpRequestDef genForresetSimCard() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, ResetSimCardRequest.class, ResetSimCardResponse.class) .withName("ResetSimCard") .withUri("/v1/sim-cards/{sim_card_id}/reset") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ResetSimCardRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); builder.withRequestField("body", LocationType.Body, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(DownUpTimeForSimCardReq.class), f -> f.withMarshaller(ResetSimCardRequest::getBody, (req, v) -> { req.setBody(v); })); // response return builder.build(); } public static final HttpRequestDef setExceedCutNet = genForsetExceedCutNet(); private static HttpRequestDef genForsetExceedCutNet() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, SetExceedCutNetRequest.class, SetExceedCutNetResponse.class) .withName("SetExceedCutNet") .withUri("/v1/sim-cards/{sim_card_id}/exceed-cut-net") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(SetExceedCutNetRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); builder.withRequestField("body", LocationType.Body, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(ExceedCutNetReq.class), f -> f.withMarshaller(SetExceedCutNetRequest::getBody, (req, v) -> { req.setBody(v); })); // response return builder.build(); } public static final HttpRequestDef setSpeedValue = genForsetSpeedValue(); private static HttpRequestDef genForsetSpeedValue() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, SetSpeedValueRequest.class, SetSpeedValueResponse.class) .withName("SetSpeedValue") .withUri("/v1/sim-cards/{sim_card_id}/speed-limit") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(SetSpeedValueRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); builder.withRequestField("body", LocationType.Body, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(SetSpeedValueReq.class), f -> f.withMarshaller(SetSpeedValueRequest::getBody, (req, v) -> { req.setBody(v); })); // response return builder.build(); } public static final HttpRequestDef showRealNamed = genForshowRealNamed(); private static HttpRequestDef genForshowRealNamed() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.GET, ShowRealNamedRequest.class, ShowRealNamedResponse.class) .withName("ShowRealNamed") .withUri("/v1/sim-cards/{sim_card_id}/real-named") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ShowRealNamedRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); // response return builder.build(); } public static final HttpRequestDef showSimCard = genForshowSimCard(); private static HttpRequestDef genForshowSimCard() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.GET, ShowSimCardRequest.class, ShowSimCardResponse.class) .withName("ShowSimCard") .withUri("/v1/sim-cards/{sim_card_id}") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ShowSimCardRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); // response return builder.build(); } public static final HttpRequestDef startStopNet = genForstartStopNet(); private static HttpRequestDef genForstartStopNet() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, StartStopNetRequest.class, StartStopNetResponse.class) .withName("StartStopNet") .withUri("/v1/sim-cards/{sim_card_id}/cut-net") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(StartStopNetRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); builder.withRequestField("body", LocationType.Body, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(CutNetReq.class), f -> f.withMarshaller(StartStopNetRequest::getBody, (req, v) -> { req.setBody(v); })); // response return builder.build(); } public static final HttpRequestDef stopSimCard = genForstopSimCard(); private static HttpRequestDef genForstopSimCard() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, StopSimCardRequest.class, StopSimCardResponse.class) .withName("StopSimCard") .withUri("/v1/sim-cards/{sim_card_id}/stop") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(StopSimCardRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); builder.withRequestField("body", LocationType.Body, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(DownUpTimeForSimCardReq.class), f -> f.withMarshaller(StopSimCardRequest::getBody, (req, v) -> { req.setBody(v); })); // response return builder.build(); } public static final HttpRequestDef listSimPoolMembers = genForlistSimPoolMembers(); private static HttpRequestDef genForlistSimPoolMembers() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.GET, ListSimPoolMembersRequest.class, ListSimPoolMembersResponse.class) .withName("ListSimPoolMembers") .withUri("/v1/sim-pools/{sim_pool_id}/members") .withContentType("application/json"); // requests builder.withRequestField("sim_pool_id", LocationType.Path, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPoolMembersRequest::getSimPoolId, (req, v) -> { req.setSimPoolId(v); })); builder.withRequestField("cid", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimPoolMembersRequest::getCid, (req, v) -> { req.setCid(v); })); builder.withRequestField("limit", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPoolMembersRequest::getLimit, (req, v) -> { req.setLimit(v); })); builder.withRequestField("offset", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPoolMembersRequest::getOffset, (req, v) -> { req.setOffset(v); })); builder.withRequestField("billing_cycle", LocationType.Query, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimPoolMembersRequest::getBillingCycle, (req, v) -> { req.setBillingCycle(v); })); // response return builder.build(); } public static final HttpRequestDef listSimPools = genForlistSimPools(); private static HttpRequestDef genForlistSimPools() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.GET, ListSimPoolsRequest.class, ListSimPoolsResponse.class) .withName("ListSimPools") .withUri("/v1/sim-pools") .withContentType("application/json"); // requests builder.withRequestField("pool_name", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimPoolsRequest::getPoolName, (req, v) -> { req.setPoolName(v); })); builder.withRequestField("limit", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPoolsRequest::getLimit, (req, v) -> { req.setLimit(v); })); builder.withRequestField("offset", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPoolsRequest::getOffset, (req, v) -> { req.setOffset(v); })); builder.withRequestField("billing_cycle", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(String.class), f -> f.withMarshaller(ListSimPoolsRequest::getBillingCycle, (req, v) -> { req.setBillingCycle(v); })); // response return builder.build(); } public static final HttpRequestDef listFlowBySimCards = genForlistFlowBySimCards(); private static HttpRequestDef genForlistFlowBySimCards() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.POST, ListFlowBySimCardsRequest.class, ListFlowBySimCardsResponse.class) .withName("ListFlowBySimCards") .withUri("/v1/sim-price-plans/usage/batch-query") .withContentType("application/json"); // requests builder.withRequestField("body", LocationType.Body, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(ListFlowBySimCardsReq.class), f -> f.withMarshaller(ListFlowBySimCardsRequest::getBody, (req, v) -> { req.setBody(v); })); // response builder.>withResponseField("body", LocationType.Body, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(List.class), f -> f.withMarshaller(ListFlowBySimCardsResponse::getBody, (response, data) -> { response.setBody(data); }).withInnerContainerType(SimCardsFlowVO.class)); return builder.build(); } public static final HttpRequestDef listSimPricePlans = genForlistSimPricePlans(); private static HttpRequestDef genForlistSimPricePlans() { // basic HttpRequestDef.Builder builder = HttpRequestDef.builder(HttpMethod.GET, ListSimPricePlansRequest.class, ListSimPricePlansResponse.class) .withName("ListSimPricePlans") .withUri("/v1/sim-price-plans") .withContentType("application/json"); // requests builder.withRequestField("sim_card_id", LocationType.Query, FieldExistence.NON_NULL_NON_EMPTY, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPricePlansRequest::getSimCardId, (req, v) -> { req.setSimCardId(v); })); builder.withRequestField("real_time", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Boolean.class), f -> f.withMarshaller(ListSimPricePlansRequest::getRealTime, (req, v) -> { req.setRealTime(v); })); builder.withRequestField("limit", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPricePlansRequest::getLimit, (req, v) -> { req.setLimit(v); })); builder.withRequestField("offset", LocationType.Query, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(Long.class), f -> f.withMarshaller(ListSimPricePlansRequest::getOffset, (req, v) -> { req.setOffset(v); })); // response builder.>withResponseField("body", LocationType.Body, FieldExistence.NULL_IGNORE, TypeCasts.uncheckedConversion(List.class), f -> f.withMarshaller(ListSimPricePlansResponse::getBody, (response, data) -> { response.setBody(data); }).withInnerContainerType(SimPricePlanVO.class)); return builder.build(); } }