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

com.huaweicloud.sdk.bcs.v2.BcsMeta Maven / Gradle / Ivy

package com.huaweicloud.sdk.bcs.v2;

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.bcs.v2.model.*;
import java.util.List;
import java.util.Map;
import java.time.OffsetDateTime;

@SuppressWarnings("unchecked")
public class BcsMeta {

    public static final HttpRequestDef batchAddPeersToChannel = genForbatchAddPeersToChannel();

    private static HttpRequestDef genForbatchAddPeersToChannel() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, BatchAddPeersToChannelRequest.class, BatchAddPeersToChannelResponse.class)
                .withName("BatchAddPeersToChannel")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/channels/peers")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(BatchAddPeersToChannelRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            BatchAddPeersToChannelRequestBody.class,
            f -> f.withMarshaller(BatchAddPeersToChannelRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef batchCreateChannels = genForbatchCreateChannels();

    private static HttpRequestDef genForbatchCreateChannels() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, BatchCreateChannelsRequest.class, BatchCreateChannelsResponse.class)
                .withName("BatchCreateChannels")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/channels")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(BatchCreateChannelsRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            BatchCreateChannelsRequestBody.class,
            f -> f.withMarshaller(BatchCreateChannelsRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef batchInviteMembersToChannel = genForbatchInviteMembersToChannel();

    private static HttpRequestDef genForbatchInviteMembersToChannel() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, BatchInviteMembersToChannelRequest.class, BatchInviteMembersToChannelResponse.class)
                .withName("BatchInviteMembersToChannel")
                .withUri("/v2/{project_id}/members/invitations")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            BatchInviteMembersToChannelRequestBody.class,
            f -> f.withMarshaller(BatchInviteMembersToChannelRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef createNewBlockchain = genForcreateNewBlockchain();

    private static HttpRequestDef genForcreateNewBlockchain() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, CreateNewBlockchainRequest.class, CreateNewBlockchainResponse.class)
                .withName("CreateNewBlockchain")
                .withUri("/v2/{project_id}/blockchains")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            CreateRequestBody.class,
            f -> f.withMarshaller(CreateNewBlockchainRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef deleteBlockchain = genFordeleteBlockchain();

    private static HttpRequestDef genFordeleteBlockchain() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.DELETE, DeleteBlockchainRequest.class, DeleteBlockchainResponse.class)
                .withName("DeleteBlockchain")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(DeleteBlockchainRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("is_delete_storage",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            Boolean.class,
            f -> f.withMarshaller(DeleteBlockchainRequest::getIsDeleteStorage, (req, v) -> {
                req.setIsDeleteStorage(v);
            })
        );
        builder.withRequestField("is_delete_obs",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            Boolean.class,
            f -> f.withMarshaller(DeleteBlockchainRequest::getIsDeleteObs, (req, v) -> {
                req.setIsDeleteObs(v);
            })
        );
        builder.withRequestField("is_delete_resource",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            Boolean.class,
            f -> f.withMarshaller(DeleteBlockchainRequest::getIsDeleteResource, (req, v) -> {
                req.setIsDeleteResource(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef downloadBlockchainCert = genFordownloadBlockchainCert();

    private static HttpRequestDef genFordownloadBlockchainCert() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, DownloadBlockchainCertRequest.class, DownloadBlockchainCertResponse.class)
                .withName("DownloadBlockchainCert")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/cert")
                .withContentType("application/json");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(DownloadBlockchainCertRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("org_name",
            LocationType.Query,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(DownloadBlockchainCertRequest::getOrgName, (req, v) -> {
                req.setOrgName(v);
            })
        );
        builder.withRequestField("cert_type",
            LocationType.Query,
            FieldExistence.NON_NULL_NON_EMPTY,
            DownloadBlockchainCertRequest.CertTypeEnum.class,
            f -> f.withMarshaller(DownloadBlockchainCertRequest::getCertType, (req, v) -> {
                req.setCertType(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef downloadBlockchainSdkConfig = genFordownloadBlockchainSdkConfig();

    private static HttpRequestDef genFordownloadBlockchainSdkConfig() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, DownloadBlockchainSdkConfigRequest.class, DownloadBlockchainSdkConfigResponse.class)
                .withName("DownloadBlockchainSdkConfig")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/sdk-cfg")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(DownloadBlockchainSdkConfigRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            CfgRequestBody.class,
            f -> f.withMarshaller(DownloadBlockchainSdkConfigRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef handleNotification = genForhandleNotification();

    private static HttpRequestDef genForhandleNotification() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, HandleNotificationRequest.class, HandleNotificationResponse.class)
                .withName("HandleNotification")
                .withUri("/v2/{project_id}/notification/handle")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            HandleNotificationRequestBody.class,
            f -> f.withMarshaller(HandleNotificationRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listBcsMetric = genForlistBcsMetric();

    private static HttpRequestDef genForlistBcsMetric() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, ListBcsMetricRequest.class, ListBcsMetricResponse.class)
                .withName("ListBcsMetric")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/metric/list")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(ListBcsMetricRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            ListBcsMetricRequestBody.class,
            f -> f.withMarshaller(ListBcsMetricRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listBlockchainChannels = genForlistBlockchainChannels();

    private static HttpRequestDef genForlistBlockchainChannels() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListBlockchainChannelsRequest.class, ListBlockchainChannelsResponse.class)
                .withName("ListBlockchainChannels")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/channels")
                .withContentType("application/json");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(ListBlockchainChannelsRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listBlockchains = genForlistBlockchains();

    private static HttpRequestDef genForlistBlockchains() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListBlockchainsRequest.class, ListBlockchainsResponse.class)
                .withName("ListBlockchains")
                .withUri("/v2/{project_id}/blockchains")
                .withContentType("application/json");

        // requests

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listEntityMetric = genForlistEntityMetric();

    private static HttpRequestDef genForlistEntityMetric() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, ListEntityMetricRequest.class, ListEntityMetricResponse.class)
                .withName("ListEntityMetric")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/entity/metric/list")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(ListEntityMetricRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            ListEntityMetricRequestBody.class,
            f -> f.withMarshaller(ListEntityMetricRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listInstanceMetric = genForlistInstanceMetric();

    private static HttpRequestDef genForlistInstanceMetric() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.POST, ListInstanceMetricRequest.class, ListInstanceMetricResponse.class)
                .withName("ListInstanceMetric")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/entity/instance/metric/list")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(ListInstanceMetricRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            ListInstanceMetricRequestBody.class,
            f -> f.withMarshaller(ListInstanceMetricRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listMembers = genForlistMembers();

    private static HttpRequestDef genForlistMembers() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListMembersRequest.class, ListMembersResponse.class)
                .withName("ListMembers")
                .withUri("/v2/{project_id}/members")
                .withContentType("application/json");

        // requests

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listNotifications = genForlistNotifications();

    private static HttpRequestDef genForlistNotifications() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListNotificationsRequest.class, ListNotificationsResponse.class)
                .withName("ListNotifications")
                .withUri("/v2/{project_id}/notifications")
                .withContentType("application/json");

        // requests

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listOpRecord = genForlistOpRecord();

    private static HttpRequestDef genForlistOpRecord() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListOpRecordRequest.class, ListOpRecordResponse.class)
                .withName("ListOpRecord")
                .withUri("/v2/{project_id}/operation/record")
                .withContentType("application/json");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(ListOpRecordRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("operation_status",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            ListOpRecordRequest.OperationStatusEnum.class,
            f -> f.withMarshaller(ListOpRecordRequest::getOperationStatus, (req, v) -> {
                req.setOperationStatus(v);
            })
        );
        builder.withRequestField("resource_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            ListOpRecordRequest.ResourceTypeEnum.class,
            f -> f.withMarshaller(ListOpRecordRequest::getResourceType, (req, v) -> {
                req.setResourceType(v);
            })
        );
        builder.withRequestField("operation_type",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            ListOpRecordRequest.OperationTypeEnum.class,
            f -> f.withMarshaller(ListOpRecordRequest::getOperationType, (req, v) -> {
                req.setOperationType(v);
            })
        );
        builder.withRequestField("operation_id",
            LocationType.Query,
            FieldExistence.NULL_IGNORE,
            String.class,
            f -> f.withMarshaller(ListOpRecordRequest::getOperationId, (req, v) -> {
                req.setOperationId(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef listQuotas = genForlistQuotas();

    private static HttpRequestDef genForlistQuotas() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ListQuotasRequest.class, ListQuotasResponse.class)
                .withName("ListQuotas")
                .withUri("/v2/{project_id}/quotas")
                .withContentType("application/json");

        // requests

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef showBlockchainDetail = genForshowBlockchainDetail();

    private static HttpRequestDef genForshowBlockchainDetail() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowBlockchainDetailRequest.class, ShowBlockchainDetailResponse.class)
                .withName("ShowBlockchainDetail")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}")
                .withContentType("application/json");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(ShowBlockchainDetailRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef showBlockchainNodes = genForshowBlockchainNodes();

    private static HttpRequestDef genForshowBlockchainNodes() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowBlockchainNodesRequest.class, ShowBlockchainNodesResponse.class)
                .withName("ShowBlockchainNodes")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/nodes")
                .withContentType("application/json");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(ShowBlockchainNodesRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef showBlockchainStatus = genForshowBlockchainStatus();

    private static HttpRequestDef genForshowBlockchainStatus() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.GET, ShowBlockchainStatusRequest.class, ShowBlockchainStatusResponse.class)
                .withName("ShowBlockchainStatus")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}/status")
                .withContentType("application/json");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(ShowBlockchainStatusRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );

        // response
        


        return builder.build();
    }

    public static final HttpRequestDef updateInstance = genForupdateInstance();

    private static HttpRequestDef genForupdateInstance() {
        // basic
        HttpRequestDef.Builder builder =
            HttpRequestDef.builder(HttpMethod.PUT, UpdateInstanceRequest.class, UpdateInstanceResponse.class)
                .withName("UpdateInstance")
                .withUri("/v2/{project_id}/blockchains/{blockchain_id}")
                .withContentType("application/json;charset=UTF-8");

        // requests
        builder.withRequestField("blockchain_id",
            LocationType.Path,
            FieldExistence.NON_NULL_NON_EMPTY,
            String.class,
            f -> f.withMarshaller(UpdateInstanceRequest::getBlockchainId, (req, v) -> {
                req.setBlockchainId(v);
            })
        );
        builder.withRequestField("body",
            LocationType.Body,
            FieldExistence.NON_NULL_NON_EMPTY,
            OpIdRes.class,
            f -> f.withMarshaller(UpdateInstanceRequest::getBody, (req, v) -> {
                req.setBody(v);
            })
        );

        // response
        


        return builder.build();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy