From a6f36587796399db1443a0175a99e072ff9815ec Mon Sep 17 00:00:00 2001 From: unionsdk Date: Fri, 6 Jan 2023 14:09:33 +0800 Subject: [PATCH] release 0.0.2-beta source code for php --- CHANGELOG.md | 20 + Core/composer.json | 2 +- Core/src/Client.php | 2 +- README.md | 2 +- Services/Cdn/composer.json | 4 +- Services/Cse/composer.json | 4 +- Services/Ecs/composer.json | 4 +- Services/Evs/composer.json | 4 +- Services/Ims/V2/ImsAsyncClient.php | 3153 +++++++++++++++++ Services/Ims/V2/ImsClient.php | 3021 ++++++++++++++++ Services/Ims/V2/Model/AddImageTagRequest.php | 303 ++ .../Ims/V2/Model/AddImageTagRequestBody.php | 268 ++ Services/Ims/V2/Model/AddImageTagResponse.php | 236 ++ .../V2/Model/AddOrUpdateTagsRequestBody.php | 338 ++ .../Ims/V2/Model/AdditionalProperties.php | 268 ++ .../Ims/V2/Model/BatchAddMembersRequest.php | 265 ++ .../V2/Model/BatchAddMembersRequestBody.php | 306 ++ .../Ims/V2/Model/BatchAddMembersResponse.php | 266 ++ .../V2/Model/BatchAddOrDeleteTagsRequest.php | 303 ++ .../Model/BatchAddOrDeleteTagsRequestBody.php | 329 ++ .../V2/Model/BatchAddOrDeleteTagsResponse.php | 236 ++ .../V2/Model/BatchDeleteMembersRequest.php | 265 ++ .../V2/Model/BatchDeleteMembersResponse.php | 266 ++ .../V2/Model/BatchUpdateMembersRequest.php | 265 ++ .../Model/BatchUpdateMembersRequestBody.php | 402 +++ .../V2/Model/BatchUpdateMembersResponse.php | 266 ++ .../V2/Model/CopyImageCrossRegionRequest.php | 303 ++ .../Model/CopyImageCrossRegionRequestBody.php | 423 +++ .../V2/Model/CopyImageCrossRegionResponse.php | 266 ++ .../Ims/V2/Model/CopyImageInRegionRequest.php | 303 ++ .../V2/Model/CopyImageInRegionRequestBody.php | 379 ++ .../V2/Model/CopyImageInRegionResponse.php | 266 ++ Services/Ims/V2/Model/CreateDataImage.php | 376 ++ .../Ims/V2/Model/CreateDataImageRequest.php | 265 ++ .../V2/Model/CreateDataImageRequestBody.php | 589 +++ .../Ims/V2/Model/CreateDataImageResponse.php | 266 ++ Services/Ims/V2/Model/CreateImageRequest.php | 265 ++ .../Ims/V2/Model/CreateImageRequestBody.php | 919 +++++ Services/Ims/V2/Model/CreateImageResponse.php | 266 ++ .../V2/Model/CreateOrUpdateTagsRequest.php | 265 ++ .../V2/Model/CreateOrUpdateTagsResponse.php | 236 ++ .../Ims/V2/Model/CreateWholeImageRequest.php | 265 ++ .../V2/Model/CreateWholeImageRequestBody.php | 630 ++++ .../Ims/V2/Model/CreateWholeImageResponse.php | 266 ++ .../Ims/V2/Model/DeleteImageTagRequest.php | 306 ++ .../Ims/V2/Model/DeleteImageTagResponse.php | 236 ++ Services/Ims/V2/Model/ExportImageRequest.php | 303 ++ .../Ims/V2/Model/ExportImageRequestBody.php | 368 ++ Services/Ims/V2/Model/ExportImageResponse.php | 266 ++ .../V2/Model/GlanceAddImageMemberRequest.php | 303 ++ .../Model/GlanceAddImageMemberRequestBody.php | 268 ++ .../V2/Model/GlanceAddImageMemberResponse.php | 441 +++ .../GlanceCreateImageMetadataRequest.php | 265 ++ .../GlanceCreateImageMetadataRequestBody.php | 580 +++ .../GlanceCreateImageMetadataResponse.php | 1422 ++++++++ .../Ims/V2/Model/GlanceCreateTagRequest.php | 306 ++ .../Ims/V2/Model/GlanceCreateTagResponse.php | 236 ++ .../Model/GlanceDeleteImageMemberRequest.php | 306 ++ .../Model/GlanceDeleteImageMemberResponse.php | 236 ++ .../Ims/V2/Model/GlanceDeleteImageRequest.php | 303 ++ .../V2/Model/GlanceDeleteImageRequestBody.php | 265 ++ .../V2/Model/GlanceDeleteImageResponse.php | 236 ++ .../Ims/V2/Model/GlanceDeleteTagRequest.php | 306 ++ .../Ims/V2/Model/GlanceDeleteTagResponse.php | 236 ++ Services/Ims/V2/Model/GlanceImageMembers.php | 458 +++ .../GlanceListImageMemberSchemasRequest.php | 235 ++ .../GlanceListImageMemberSchemasResponse.php | 336 ++ .../Model/GlanceListImageMembersRequest.php | 268 ++ .../Model/GlanceListImageMembersResponse.php | 301 ++ .../Model/GlanceListImageSchemasRequest.php | 235 ++ .../Model/GlanceListImageSchemasResponse.php | 336 ++ .../Ims/V2/Model/GlanceListImagesRequest.php | 1555 ++++++++ .../Ims/V2/Model/GlanceListImagesResponse.php | 371 ++ .../V2/Model/GlanceShowImageMemberRequest.php | 306 ++ .../Model/GlanceShowImageMemberResponse.php | 441 +++ .../GlanceShowImageMemberSchemasRequest.php | 235 ++ .../GlanceShowImageMemberSchemasResponse.php | 301 ++ .../Ims/V2/Model/GlanceShowImageRequest.php | 268 ++ .../Ims/V2/Model/GlanceShowImageResponse.php | 2695 ++++++++++++++ .../V2/Model/GlanceShowImageResponseBody.php | 2760 +++++++++++++++ .../Model/GlanceShowImageSchemasRequest.php | 235 ++ .../Model/GlanceShowImageSchemasResponse.php | 371 ++ .../Model/GlanceUpdateImageMemberRequest.php | 341 ++ .../GlanceUpdateImageMemberRequestBody.php | 326 ++ .../Model/GlanceUpdateImageMemberResponse.php | 441 +++ .../Ims/V2/Model/GlanceUpdateImageRequest.php | 303 ++ .../V2/Model/GlanceUpdateImageRequestBody.php | 366 ++ .../V2/Model/GlanceUpdateImageResponse.php | 2695 ++++++++++++++ Services/Ims/V2/Model/ImageInfo.php | 2681 ++++++++++++++ Services/Ims/V2/Model/ImageTag.php | 300 ++ .../Ims/V2/Model/ImportImageQuickRequest.php | 265 ++ .../Ims/V2/Model/ImportImageQuickResponse.php | 266 ++ Services/Ims/V2/Model/JobEntities.php | 405 +++ Services/Ims/V2/Model/JobEntitiesResult.php | 335 ++ Services/Ims/V2/Model/JobProgressEntities.php | 405 +++ Services/Ims/V2/Model/Links.php | 306 ++ .../Ims/V2/Model/ListImageByTagsRequest.php | 265 ++ .../V2/Model/ListImageByTagsRequestBody.php | 571 +++ .../Ims/V2/Model/ListImageByTagsResponse.php | 301 ++ .../Ims/V2/Model/ListImageTagsRequest.php | 268 ++ .../Ims/V2/Model/ListImageTagsResponse.php | 266 ++ Services/Ims/V2/Model/ListImagesRequest.php | 1880 ++++++++++ Services/Ims/V2/Model/ListImagesResponse.php | 266 ++ .../Ims/V2/Model/ListImagesTagsRequest.php | 235 ++ .../Ims/V2/Model/ListImagesTagsResponse.php | 266 ++ .../Ims/V2/Model/ListOsVersionsRequest.php | 265 ++ .../Ims/V2/Model/ListOsVersionsResponse.php | 266 ++ .../V2/Model/ListOsVersionsResponseBody.php | 306 ++ Services/Ims/V2/Model/ListTagsRequest.php | 909 +++++ Services/Ims/V2/Model/ListTagsResponse.php | 266 ++ Services/Ims/V2/Model/ListVersionsRequest.php | 235 ++ .../Ims/V2/Model/ListVersionsResponse.php | 266 ++ Services/Ims/V2/Model/OsVersionInfo.php | 420 +++ Services/Ims/V2/Model/OsVersionResponse.php | 338 ++ .../Model/QueryImageByTagsResourceDetail.php | 268 ++ .../QuickImportImageByFileRequestBody.php | 716 ++++ Services/Ims/V2/Model/Quota.php | 268 ++ Services/Ims/V2/Model/QuotaInfo.php | 420 +++ .../Ims/V2/Model/RegisterImageRequest.php | 303 ++ .../Ims/V2/Model/RegisterImageRequestBody.php | 268 ++ .../Ims/V2/Model/RegisterImageResponse.php | 266 ++ Services/Ims/V2/Model/ResourceTag.php | 306 ++ .../Ims/V2/Model/ShowImageByTagsResource.php | 382 ++ .../Ims/V2/Model/ShowImageQuotaRequest.php | 235 ++ .../Ims/V2/Model/ShowImageQuotaResponse.php | 266 ++ .../Ims/V2/Model/ShowJobProgressRequest.php | 268 ++ .../Ims/V2/Model/ShowJobProgressResponse.php | 538 +++ Services/Ims/V2/Model/ShowJobRequest.php | 268 ++ Services/Ims/V2/Model/ShowJobResponse.php | 538 +++ Services/Ims/V2/Model/ShowVersionRequest.php | 268 ++ Services/Ims/V2/Model/ShowVersionResponse.php | 266 ++ Services/Ims/V2/Model/TagKeyValue.php | 306 ++ Services/Ims/V2/Model/Tags.php | 306 ++ Services/Ims/V2/Model/UpdateImageRequest.php | 303 ++ .../Ims/V2/Model/UpdateImageRequestBody.php | 369 ++ Services/Ims/V2/Model/UpdateImageResponse.php | 2622 ++++++++++++++ Services/Ims/V2/Region/ImsRegion.php | 27 + Services/Ims/composer.json | 30 + .../Smn/V2/Model/AddSubscriptionRequest.php | 303 ++ .../V2/Model/AddSubscriptionRequestBody.php | 341 ++ .../Smn/V2/Model/AddSubscriptionResponse.php | 301 ++ Services/Smn/V2/Model/ApplicationEndpoint.php | 420 +++ Services/Smn/V2/Model/ApplicationItem.php | 493 +++ ...BatchCreateOrDeleteResourceTagsRequest.php | 341 ++ ...hCreateOrDeleteResourceTagsRequestBody.php | 306 ++ ...atchCreateOrDeleteResourceTagsResponse.php | 236 ++ .../V2/Model/CancelSubscriptionRequest.php | 268 ++ .../V2/Model/CancelSubscriptionResponse.php | 266 ++ .../CreateApplicationEndpointRequest.php | 303 ++ .../CreateApplicationEndpointRequestBody.php | 306 ++ .../CreateApplicationEndpointResponse.php | 301 ++ .../Smn/V2/Model/CreateApplicationRequest.php | 265 ++ .../V2/Model/CreateApplicationRequestBody.php | 382 ++ .../V2/Model/CreateApplicationResponse.php | 336 ++ .../V2/Model/CreateMessageTemplateRequest.php | 265 ++ .../CreateMessageTemplateRequestBody.php | 344 ++ .../Model/CreateMessageTemplateResponse.php | 301 ++ .../Smn/V2/Model/CreateResourceTagRequest.php | 341 ++ .../V2/Model/CreateResourceTagRequestBody.php | 268 ++ .../Model/CreateResourceTagRequestBodyTag.php | 306 ++ .../V2/Model/CreateResourceTagResponse.php | 236 ++ Services/Smn/V2/Model/CreateTopicRequest.php | 265 ++ .../Smn/V2/Model/CreateTopicRequestBody.php | 353 ++ Services/Smn/V2/Model/CreateTopicResponse.php | 301 ++ .../DeleteApplicationEndpointRequest.php | 268 ++ .../DeleteApplicationEndpointResponse.php | 266 ++ .../Smn/V2/Model/DeleteApplicationRequest.php | 268 ++ .../V2/Model/DeleteApplicationResponse.php | 266 ++ .../V2/Model/DeleteMessageTemplateRequest.php | 268 ++ .../Model/DeleteMessageTemplateResponse.php | 266 ++ .../Smn/V2/Model/DeleteResourceTagRequest.php | 344 ++ .../V2/Model/DeleteResourceTagResponse.php | 236 ++ .../DeleteTopicAttributeByNameRequest.php | 306 ++ .../DeleteTopicAttributeByNameResponse.php | 266 ++ .../V2/Model/DeleteTopicAttributesRequest.php | 268 ++ .../Model/DeleteTopicAttributesResponse.php | 266 ++ Services/Smn/V2/Model/DeleteTopicRequest.php | 268 ++ Services/Smn/V2/Model/DeleteTopicResponse.php | 266 ++ Services/Smn/V2/Model/LinksItem.php | 306 ++ .../ListApplicationAttributesRequest.php | 268 ++ .../ListApplicationAttributesResponse.php | 336 ++ ...cationAttributesResponseBodyAttributes.php | 303 ++ ...stApplicationEndpointAttributesRequest.php | 268 ++ ...tApplicationEndpointAttributesResponse.php | 301 ++ ...dpointAttributesResponseBodyAttributes.php | 344 ++ .../Model/ListApplicationEndpointsRequest.php | 443 +++ .../ListApplicationEndpointsResponse.php | 336 ++ .../Smn/V2/Model/ListApplicationsRequest.php | 370 ++ .../Smn/V2/Model/ListApplicationsResponse.php | 336 ++ .../Smn/V2/Model/ListInstanceRequestBody.php | 513 +++ .../ListMessageTemplateDetailsRequest.php | 268 ++ .../ListMessageTemplateDetailsResponse.php | 511 +++ .../V2/Model/ListMessageTemplatesRequest.php | 370 ++ .../V2/Model/ListMessageTemplatesResponse.php | 336 ++ .../Smn/V2/Model/ListProjectTagsRequest.php | 268 ++ .../Smn/V2/Model/ListProjectTagsResponse.php | 266 ++ .../V2/Model/ListResourceInstancesRequest.php | 303 ++ .../Model/ListResourceInstancesResponse.php | 301 ++ .../Smn/V2/Model/ListResourceTagsRequest.php | 306 ++ .../Smn/V2/Model/ListResourceTagsResponse.php | 266 ++ .../Model/ListSubscriptionsByTopicRequest.php | 338 ++ .../ListSubscriptionsByTopicResponse.php | 336 ++ .../Smn/V2/Model/ListSubscriptionsItem.php | 496 +++ .../Smn/V2/Model/ListSubscriptionsRequest.php | 405 +++ .../V2/Model/ListSubscriptionsResponse.php | 336 ++ .../V2/Model/ListTopicAttributesRequest.php | 306 ++ .../V2/Model/ListTopicAttributesResponse.php | 301 ++ .../Smn/V2/Model/ListTopicDetailsRequest.php | 268 ++ .../Smn/V2/Model/ListTopicDetailsResponse.php | 511 +++ Services/Smn/V2/Model/ListTopicsItem.php | 420 +++ Services/Smn/V2/Model/ListTopicsRequest.php | 405 +++ Services/Smn/V2/Model/ListTopicsResponse.php | 336 ++ Services/Smn/V2/Model/ListVersionRequest.php | 268 ++ Services/Smn/V2/Model/ListVersionResponse.php | 266 ++ Services/Smn/V2/Model/ListVersionsRequest.php | 235 ++ .../Smn/V2/Model/ListVersionsResponse.php | 266 ++ Services/Smn/V2/Model/MessageTemplate.php | 458 +++ .../Smn/V2/Model/PublishAppMessageRequest.php | 303 ++ .../V2/Model/PublishAppMessageRequestBody.php | 335 ++ .../V2/Model/PublishAppMessageResponse.php | 301 ++ .../Smn/V2/Model/PublishMessageRequest.php | 303 ++ .../V2/Model/PublishMessageRequestBody.php | 440 +++ .../Smn/V2/Model/PublishMessageResponse.php | 301 ++ Services/Smn/V2/Model/ResourceDetail.php | 382 ++ Services/Smn/V2/Model/ResourceTag.php | 306 ++ Services/Smn/V2/Model/ResourceTags.php | 306 ++ Services/Smn/V2/Model/Statement.php | 516 +++ Services/Smn/V2/Model/TagMatch.php | 306 ++ Services/Smn/V2/Model/TagResource.php | 382 ++ Services/Smn/V2/Model/TopicAttribute.php | 344 ++ .../UpdateApplicationEndpointRequest.php | 303 ++ .../UpdateApplicationEndpointRequestBody.php | 300 ++ .../UpdateApplicationEndpointResponse.php | 266 ++ .../Smn/V2/Model/UpdateApplicationRequest.php | 303 ++ .../V2/Model/UpdateApplicationRequestBody.php | 306 ++ .../V2/Model/UpdateApplicationResponse.php | 266 ++ .../V2/Model/UpdateMessageTemplateRequest.php | 303 ++ .../UpdateMessageTemplateRequestBody.php | 268 ++ .../Model/UpdateMessageTemplateResponse.php | 266 ++ .../V2/Model/UpdateTopicAttributeRequest.php | 341 ++ .../Model/UpdateTopicAttributeRequestBody.php | 268 ++ .../V2/Model/UpdateTopicAttributeResponse.php | 266 ++ Services/Smn/V2/Model/UpdateTopicRequest.php | 303 ++ .../Smn/V2/Model/UpdateTopicRequestBody.php | 274 ++ Services/Smn/V2/Model/UpdateTopicResponse.php | 266 ++ Services/Smn/V2/Model/VersionItem.php | 458 +++ Services/Smn/V2/Region/SmnRegion.php | 27 + Services/Smn/V2/SmnAsyncClient.php | 2659 ++++++++++++++ Services/Smn/V2/SmnClient.php | 2542 +++++++++++++ Services/Smn/composer.json | 30 + Services/Vpc/composer.json | 4 +- composer.json | 2 +- 252 files changed, 102844 insertions(+), 14 deletions(-) create mode 100755 Services/Ims/V2/ImsAsyncClient.php create mode 100755 Services/Ims/V2/ImsClient.php create mode 100755 Services/Ims/V2/Model/AddImageTagRequest.php create mode 100755 Services/Ims/V2/Model/AddImageTagRequestBody.php create mode 100755 Services/Ims/V2/Model/AddImageTagResponse.php create mode 100755 Services/Ims/V2/Model/AddOrUpdateTagsRequestBody.php create mode 100755 Services/Ims/V2/Model/AdditionalProperties.php create mode 100755 Services/Ims/V2/Model/BatchAddMembersRequest.php create mode 100755 Services/Ims/V2/Model/BatchAddMembersRequestBody.php create mode 100755 Services/Ims/V2/Model/BatchAddMembersResponse.php create mode 100755 Services/Ims/V2/Model/BatchAddOrDeleteTagsRequest.php create mode 100755 Services/Ims/V2/Model/BatchAddOrDeleteTagsRequestBody.php create mode 100755 Services/Ims/V2/Model/BatchAddOrDeleteTagsResponse.php create mode 100755 Services/Ims/V2/Model/BatchDeleteMembersRequest.php create mode 100755 Services/Ims/V2/Model/BatchDeleteMembersResponse.php create mode 100755 Services/Ims/V2/Model/BatchUpdateMembersRequest.php create mode 100755 Services/Ims/V2/Model/BatchUpdateMembersRequestBody.php create mode 100755 Services/Ims/V2/Model/BatchUpdateMembersResponse.php create mode 100755 Services/Ims/V2/Model/CopyImageCrossRegionRequest.php create mode 100755 Services/Ims/V2/Model/CopyImageCrossRegionRequestBody.php create mode 100755 Services/Ims/V2/Model/CopyImageCrossRegionResponse.php create mode 100755 Services/Ims/V2/Model/CopyImageInRegionRequest.php create mode 100755 Services/Ims/V2/Model/CopyImageInRegionRequestBody.php create mode 100755 Services/Ims/V2/Model/CopyImageInRegionResponse.php create mode 100755 Services/Ims/V2/Model/CreateDataImage.php create mode 100755 Services/Ims/V2/Model/CreateDataImageRequest.php create mode 100755 Services/Ims/V2/Model/CreateDataImageRequestBody.php create mode 100755 Services/Ims/V2/Model/CreateDataImageResponse.php create mode 100755 Services/Ims/V2/Model/CreateImageRequest.php create mode 100755 Services/Ims/V2/Model/CreateImageRequestBody.php create mode 100755 Services/Ims/V2/Model/CreateImageResponse.php create mode 100755 Services/Ims/V2/Model/CreateOrUpdateTagsRequest.php create mode 100755 Services/Ims/V2/Model/CreateOrUpdateTagsResponse.php create mode 100755 Services/Ims/V2/Model/CreateWholeImageRequest.php create mode 100755 Services/Ims/V2/Model/CreateWholeImageRequestBody.php create mode 100755 Services/Ims/V2/Model/CreateWholeImageResponse.php create mode 100755 Services/Ims/V2/Model/DeleteImageTagRequest.php create mode 100755 Services/Ims/V2/Model/DeleteImageTagResponse.php create mode 100755 Services/Ims/V2/Model/ExportImageRequest.php create mode 100755 Services/Ims/V2/Model/ExportImageRequestBody.php create mode 100755 Services/Ims/V2/Model/ExportImageResponse.php create mode 100755 Services/Ims/V2/Model/GlanceAddImageMemberRequest.php create mode 100755 Services/Ims/V2/Model/GlanceAddImageMemberRequestBody.php create mode 100755 Services/Ims/V2/Model/GlanceAddImageMemberResponse.php create mode 100755 Services/Ims/V2/Model/GlanceCreateImageMetadataRequest.php create mode 100755 Services/Ims/V2/Model/GlanceCreateImageMetadataRequestBody.php create mode 100755 Services/Ims/V2/Model/GlanceCreateImageMetadataResponse.php create mode 100755 Services/Ims/V2/Model/GlanceCreateTagRequest.php create mode 100755 Services/Ims/V2/Model/GlanceCreateTagResponse.php create mode 100755 Services/Ims/V2/Model/GlanceDeleteImageMemberRequest.php create mode 100755 Services/Ims/V2/Model/GlanceDeleteImageMemberResponse.php create mode 100755 Services/Ims/V2/Model/GlanceDeleteImageRequest.php create mode 100755 Services/Ims/V2/Model/GlanceDeleteImageRequestBody.php create mode 100755 Services/Ims/V2/Model/GlanceDeleteImageResponse.php create mode 100755 Services/Ims/V2/Model/GlanceDeleteTagRequest.php create mode 100755 Services/Ims/V2/Model/GlanceDeleteTagResponse.php create mode 100755 Services/Ims/V2/Model/GlanceImageMembers.php create mode 100755 Services/Ims/V2/Model/GlanceListImageMemberSchemasRequest.php create mode 100755 Services/Ims/V2/Model/GlanceListImageMemberSchemasResponse.php create mode 100755 Services/Ims/V2/Model/GlanceListImageMembersRequest.php create mode 100755 Services/Ims/V2/Model/GlanceListImageMembersResponse.php create mode 100755 Services/Ims/V2/Model/GlanceListImageSchemasRequest.php create mode 100755 Services/Ims/V2/Model/GlanceListImageSchemasResponse.php create mode 100755 Services/Ims/V2/Model/GlanceListImagesRequest.php create mode 100755 Services/Ims/V2/Model/GlanceListImagesResponse.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageMemberRequest.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageMemberResponse.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageMemberSchemasRequest.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageMemberSchemasResponse.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageRequest.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageResponse.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageResponseBody.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageSchemasRequest.php create mode 100755 Services/Ims/V2/Model/GlanceShowImageSchemasResponse.php create mode 100755 Services/Ims/V2/Model/GlanceUpdateImageMemberRequest.php create mode 100755 Services/Ims/V2/Model/GlanceUpdateImageMemberRequestBody.php create mode 100755 Services/Ims/V2/Model/GlanceUpdateImageMemberResponse.php create mode 100755 Services/Ims/V2/Model/GlanceUpdateImageRequest.php create mode 100755 Services/Ims/V2/Model/GlanceUpdateImageRequestBody.php create mode 100755 Services/Ims/V2/Model/GlanceUpdateImageResponse.php create mode 100755 Services/Ims/V2/Model/ImageInfo.php create mode 100755 Services/Ims/V2/Model/ImageTag.php create mode 100755 Services/Ims/V2/Model/ImportImageQuickRequest.php create mode 100755 Services/Ims/V2/Model/ImportImageQuickResponse.php create mode 100755 Services/Ims/V2/Model/JobEntities.php create mode 100755 Services/Ims/V2/Model/JobEntitiesResult.php create mode 100755 Services/Ims/V2/Model/JobProgressEntities.php create mode 100755 Services/Ims/V2/Model/Links.php create mode 100755 Services/Ims/V2/Model/ListImageByTagsRequest.php create mode 100755 Services/Ims/V2/Model/ListImageByTagsRequestBody.php create mode 100755 Services/Ims/V2/Model/ListImageByTagsResponse.php create mode 100755 Services/Ims/V2/Model/ListImageTagsRequest.php create mode 100755 Services/Ims/V2/Model/ListImageTagsResponse.php create mode 100755 Services/Ims/V2/Model/ListImagesRequest.php create mode 100755 Services/Ims/V2/Model/ListImagesResponse.php create mode 100755 Services/Ims/V2/Model/ListImagesTagsRequest.php create mode 100755 Services/Ims/V2/Model/ListImagesTagsResponse.php create mode 100755 Services/Ims/V2/Model/ListOsVersionsRequest.php create mode 100755 Services/Ims/V2/Model/ListOsVersionsResponse.php create mode 100755 Services/Ims/V2/Model/ListOsVersionsResponseBody.php create mode 100755 Services/Ims/V2/Model/ListTagsRequest.php create mode 100755 Services/Ims/V2/Model/ListTagsResponse.php create mode 100755 Services/Ims/V2/Model/ListVersionsRequest.php create mode 100755 Services/Ims/V2/Model/ListVersionsResponse.php create mode 100755 Services/Ims/V2/Model/OsVersionInfo.php create mode 100755 Services/Ims/V2/Model/OsVersionResponse.php create mode 100755 Services/Ims/V2/Model/QueryImageByTagsResourceDetail.php create mode 100755 Services/Ims/V2/Model/QuickImportImageByFileRequestBody.php create mode 100755 Services/Ims/V2/Model/Quota.php create mode 100755 Services/Ims/V2/Model/QuotaInfo.php create mode 100755 Services/Ims/V2/Model/RegisterImageRequest.php create mode 100755 Services/Ims/V2/Model/RegisterImageRequestBody.php create mode 100755 Services/Ims/V2/Model/RegisterImageResponse.php create mode 100755 Services/Ims/V2/Model/ResourceTag.php create mode 100755 Services/Ims/V2/Model/ShowImageByTagsResource.php create mode 100755 Services/Ims/V2/Model/ShowImageQuotaRequest.php create mode 100755 Services/Ims/V2/Model/ShowImageQuotaResponse.php create mode 100755 Services/Ims/V2/Model/ShowJobProgressRequest.php create mode 100755 Services/Ims/V2/Model/ShowJobProgressResponse.php create mode 100755 Services/Ims/V2/Model/ShowJobRequest.php create mode 100755 Services/Ims/V2/Model/ShowJobResponse.php create mode 100755 Services/Ims/V2/Model/ShowVersionRequest.php create mode 100755 Services/Ims/V2/Model/ShowVersionResponse.php create mode 100755 Services/Ims/V2/Model/TagKeyValue.php create mode 100755 Services/Ims/V2/Model/Tags.php create mode 100755 Services/Ims/V2/Model/UpdateImageRequest.php create mode 100755 Services/Ims/V2/Model/UpdateImageRequestBody.php create mode 100755 Services/Ims/V2/Model/UpdateImageResponse.php create mode 100755 Services/Ims/V2/Region/ImsRegion.php create mode 100755 Services/Ims/composer.json create mode 100755 Services/Smn/V2/Model/AddSubscriptionRequest.php create mode 100755 Services/Smn/V2/Model/AddSubscriptionRequestBody.php create mode 100755 Services/Smn/V2/Model/AddSubscriptionResponse.php create mode 100755 Services/Smn/V2/Model/ApplicationEndpoint.php create mode 100755 Services/Smn/V2/Model/ApplicationItem.php create mode 100755 Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequest.php create mode 100755 Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequestBody.php create mode 100755 Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsResponse.php create mode 100755 Services/Smn/V2/Model/CancelSubscriptionRequest.php create mode 100755 Services/Smn/V2/Model/CancelSubscriptionResponse.php create mode 100755 Services/Smn/V2/Model/CreateApplicationEndpointRequest.php create mode 100755 Services/Smn/V2/Model/CreateApplicationEndpointRequestBody.php create mode 100755 Services/Smn/V2/Model/CreateApplicationEndpointResponse.php create mode 100755 Services/Smn/V2/Model/CreateApplicationRequest.php create mode 100755 Services/Smn/V2/Model/CreateApplicationRequestBody.php create mode 100755 Services/Smn/V2/Model/CreateApplicationResponse.php create mode 100755 Services/Smn/V2/Model/CreateMessageTemplateRequest.php create mode 100755 Services/Smn/V2/Model/CreateMessageTemplateRequestBody.php create mode 100755 Services/Smn/V2/Model/CreateMessageTemplateResponse.php create mode 100755 Services/Smn/V2/Model/CreateResourceTagRequest.php create mode 100755 Services/Smn/V2/Model/CreateResourceTagRequestBody.php create mode 100755 Services/Smn/V2/Model/CreateResourceTagRequestBodyTag.php create mode 100755 Services/Smn/V2/Model/CreateResourceTagResponse.php create mode 100755 Services/Smn/V2/Model/CreateTopicRequest.php create mode 100755 Services/Smn/V2/Model/CreateTopicRequestBody.php create mode 100755 Services/Smn/V2/Model/CreateTopicResponse.php create mode 100755 Services/Smn/V2/Model/DeleteApplicationEndpointRequest.php create mode 100755 Services/Smn/V2/Model/DeleteApplicationEndpointResponse.php create mode 100755 Services/Smn/V2/Model/DeleteApplicationRequest.php create mode 100755 Services/Smn/V2/Model/DeleteApplicationResponse.php create mode 100755 Services/Smn/V2/Model/DeleteMessageTemplateRequest.php create mode 100755 Services/Smn/V2/Model/DeleteMessageTemplateResponse.php create mode 100755 Services/Smn/V2/Model/DeleteResourceTagRequest.php create mode 100755 Services/Smn/V2/Model/DeleteResourceTagResponse.php create mode 100755 Services/Smn/V2/Model/DeleteTopicAttributeByNameRequest.php create mode 100755 Services/Smn/V2/Model/DeleteTopicAttributeByNameResponse.php create mode 100755 Services/Smn/V2/Model/DeleteTopicAttributesRequest.php create mode 100755 Services/Smn/V2/Model/DeleteTopicAttributesResponse.php create mode 100755 Services/Smn/V2/Model/DeleteTopicRequest.php create mode 100755 Services/Smn/V2/Model/DeleteTopicResponse.php create mode 100755 Services/Smn/V2/Model/LinksItem.php create mode 100755 Services/Smn/V2/Model/ListApplicationAttributesRequest.php create mode 100755 Services/Smn/V2/Model/ListApplicationAttributesResponse.php create mode 100755 Services/Smn/V2/Model/ListApplicationAttributesResponseBodyAttributes.php create mode 100755 Services/Smn/V2/Model/ListApplicationEndpointAttributesRequest.php create mode 100755 Services/Smn/V2/Model/ListApplicationEndpointAttributesResponse.php create mode 100755 Services/Smn/V2/Model/ListApplicationEndpointAttributesResponseBodyAttributes.php create mode 100755 Services/Smn/V2/Model/ListApplicationEndpointsRequest.php create mode 100755 Services/Smn/V2/Model/ListApplicationEndpointsResponse.php create mode 100755 Services/Smn/V2/Model/ListApplicationsRequest.php create mode 100755 Services/Smn/V2/Model/ListApplicationsResponse.php create mode 100755 Services/Smn/V2/Model/ListInstanceRequestBody.php create mode 100755 Services/Smn/V2/Model/ListMessageTemplateDetailsRequest.php create mode 100755 Services/Smn/V2/Model/ListMessageTemplateDetailsResponse.php create mode 100755 Services/Smn/V2/Model/ListMessageTemplatesRequest.php create mode 100755 Services/Smn/V2/Model/ListMessageTemplatesResponse.php create mode 100755 Services/Smn/V2/Model/ListProjectTagsRequest.php create mode 100755 Services/Smn/V2/Model/ListProjectTagsResponse.php create mode 100755 Services/Smn/V2/Model/ListResourceInstancesRequest.php create mode 100755 Services/Smn/V2/Model/ListResourceInstancesResponse.php create mode 100755 Services/Smn/V2/Model/ListResourceTagsRequest.php create mode 100755 Services/Smn/V2/Model/ListResourceTagsResponse.php create mode 100755 Services/Smn/V2/Model/ListSubscriptionsByTopicRequest.php create mode 100755 Services/Smn/V2/Model/ListSubscriptionsByTopicResponse.php create mode 100755 Services/Smn/V2/Model/ListSubscriptionsItem.php create mode 100755 Services/Smn/V2/Model/ListSubscriptionsRequest.php create mode 100755 Services/Smn/V2/Model/ListSubscriptionsResponse.php create mode 100755 Services/Smn/V2/Model/ListTopicAttributesRequest.php create mode 100755 Services/Smn/V2/Model/ListTopicAttributesResponse.php create mode 100755 Services/Smn/V2/Model/ListTopicDetailsRequest.php create mode 100755 Services/Smn/V2/Model/ListTopicDetailsResponse.php create mode 100755 Services/Smn/V2/Model/ListTopicsItem.php create mode 100755 Services/Smn/V2/Model/ListTopicsRequest.php create mode 100755 Services/Smn/V2/Model/ListTopicsResponse.php create mode 100755 Services/Smn/V2/Model/ListVersionRequest.php create mode 100755 Services/Smn/V2/Model/ListVersionResponse.php create mode 100755 Services/Smn/V2/Model/ListVersionsRequest.php create mode 100755 Services/Smn/V2/Model/ListVersionsResponse.php create mode 100755 Services/Smn/V2/Model/MessageTemplate.php create mode 100755 Services/Smn/V2/Model/PublishAppMessageRequest.php create mode 100755 Services/Smn/V2/Model/PublishAppMessageRequestBody.php create mode 100755 Services/Smn/V2/Model/PublishAppMessageResponse.php create mode 100755 Services/Smn/V2/Model/PublishMessageRequest.php create mode 100755 Services/Smn/V2/Model/PublishMessageRequestBody.php create mode 100755 Services/Smn/V2/Model/PublishMessageResponse.php create mode 100755 Services/Smn/V2/Model/ResourceDetail.php create mode 100755 Services/Smn/V2/Model/ResourceTag.php create mode 100755 Services/Smn/V2/Model/ResourceTags.php create mode 100755 Services/Smn/V2/Model/Statement.php create mode 100755 Services/Smn/V2/Model/TagMatch.php create mode 100755 Services/Smn/V2/Model/TagResource.php create mode 100755 Services/Smn/V2/Model/TopicAttribute.php create mode 100755 Services/Smn/V2/Model/UpdateApplicationEndpointRequest.php create mode 100755 Services/Smn/V2/Model/UpdateApplicationEndpointRequestBody.php create mode 100755 Services/Smn/V2/Model/UpdateApplicationEndpointResponse.php create mode 100755 Services/Smn/V2/Model/UpdateApplicationRequest.php create mode 100755 Services/Smn/V2/Model/UpdateApplicationRequestBody.php create mode 100755 Services/Smn/V2/Model/UpdateApplicationResponse.php create mode 100755 Services/Smn/V2/Model/UpdateMessageTemplateRequest.php create mode 100755 Services/Smn/V2/Model/UpdateMessageTemplateRequestBody.php create mode 100755 Services/Smn/V2/Model/UpdateMessageTemplateResponse.php create mode 100755 Services/Smn/V2/Model/UpdateTopicAttributeRequest.php create mode 100755 Services/Smn/V2/Model/UpdateTopicAttributeRequestBody.php create mode 100755 Services/Smn/V2/Model/UpdateTopicAttributeResponse.php create mode 100755 Services/Smn/V2/Model/UpdateTopicRequest.php create mode 100755 Services/Smn/V2/Model/UpdateTopicRequestBody.php create mode 100755 Services/Smn/V2/Model/UpdateTopicResponse.php create mode 100755 Services/Smn/V2/Model/VersionItem.php create mode 100755 Services/Smn/V2/Region/SmnRegion.php create mode 100755 Services/Smn/V2/SmnAsyncClient.php create mode 100755 Services/Smn/V2/SmnClient.php create mode 100755 Services/Smn/composer.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 9997be5..0dee678 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +# 0.0.2-beta 2023-01-06 + +### G42Cloud SDK IMS + +- _Features_ + - New Support IMS +- _Bug Fix_ + - None +- _Change_ + - None + +### G42Cloud SDK SMN + +- _Features_ + - New Support SMN +- _Bug Fix_ + - None +- _Change_ + - None + # 0.0.1-beta 2022-11-29 ### G42Cloud SDK CDN diff --git a/Core/composer.json b/Core/composer.json index 8d8284b..8c0ddaa 100755 --- a/Core/composer.json +++ b/Core/composer.json @@ -8,7 +8,7 @@ "api", "core" ], - "version": "0.0.1-beta", + "version": "0.0.2-beta", "type": "library", "license": "Apache-2.0", "authors": [ diff --git a/Core/src/Client.php b/Core/src/Client.php index 5eb3e5b..8566c22 100755 --- a/Core/src/Client.php +++ b/Core/src/Client.php @@ -241,7 +241,7 @@ private function parsePathParams($collectionFormats, if (isset($pathParams)) { foreach ($pathParams as $k => $v) { $resourcePath = str_replace(sprintf('{%s}', $k), - urlencode(strval($v)), $resourcePath); + strval($v), $resourcePath); } } diff --git a/README.md b/README.md index d8e7d65..d6a8a8c 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

G42 Cloud Php Software Development Kit (Php SDK)

diff --git a/Services/Cdn/composer.json b/Services/Cdn/composer.json index 88651fb..10bbdd9 100755 --- a/Services/Cdn/composer.json +++ b/Services/Cdn/composer.json @@ -8,7 +8,7 @@ "api", "cdn" ], - "version": "0.0.1-beta", + "version": "0.0.2-beta", "type": "library", "license": "Apache-2.0", "authors": [ @@ -20,7 +20,7 @@ ], "minimum-stability": "dev", "require": { - "g42cloud/cloud-sdk-core": "0.0.1-beta" + "g42cloud/cloud-sdk-core": "0.0.2-beta" }, "autoload": { "psr-4": { diff --git a/Services/Cse/composer.json b/Services/Cse/composer.json index a0e94eb..b2e0603 100755 --- a/Services/Cse/composer.json +++ b/Services/Cse/composer.json @@ -8,7 +8,7 @@ "api", "cse" ], - "version": "0.0.1-beta", + "version": "0.0.2-beta", "type": "library", "license": "Apache-2.0", "authors": [ @@ -20,7 +20,7 @@ ], "minimum-stability": "dev", "require": { - "g42cloud/cloud-sdk-core": "0.0.1-beta" + "g42cloud/cloud-sdk-core": "0.0.2-beta" }, "autoload": { "psr-4": { diff --git a/Services/Ecs/composer.json b/Services/Ecs/composer.json index 34e5e53..abe4bd1 100755 --- a/Services/Ecs/composer.json +++ b/Services/Ecs/composer.json @@ -8,7 +8,7 @@ "api", "ecs" ], - "version": "0.0.1-beta", + "version": "0.0.2-beta", "type": "library", "license": "Apache-2.0", "authors": [ @@ -20,7 +20,7 @@ ], "minimum-stability": "dev", "require": { - "g42cloud/cloud-sdk-core": "0.0.1-beta" + "g42cloud/cloud-sdk-core": "0.0.2-beta" }, "autoload": { "psr-4": { diff --git a/Services/Evs/composer.json b/Services/Evs/composer.json index 4d6e800..c1fa44b 100755 --- a/Services/Evs/composer.json +++ b/Services/Evs/composer.json @@ -8,7 +8,7 @@ "api", "evs" ], - "version": "0.0.1-beta", + "version": "0.0.2-beta", "type": "library", "license": "Apache-2.0", "authors": [ @@ -20,7 +20,7 @@ ], "minimum-stability": "dev", "require": { - "g42cloud/cloud-sdk-core": "0.0.1-beta" + "g42cloud/cloud-sdk-core": "0.0.2-beta" }, "autoload": { "psr-4": { diff --git a/Services/Ims/V2/ImsAsyncClient.php b/Services/Ims/V2/ImsAsyncClient.php new file mode 100755 index 0000000..70df827 --- /dev/null +++ b/Services/Ims/V2/ImsAsyncClient.php @@ -0,0 +1,3153 @@ +modelPackage = ModelInterface::class; + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + public static function newBuilder() + { + return new ClientBuilder(new ImsAsyncClient()); + } + + /** + * 添加镜像标签 + * + * 该接口用于为指定镜像添加或更新指定的单个标签 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function addImageTagAsync($request) + { + return $this->addImageTagAsyncWithHttpInfo($request); + } + + public function addImageTagAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/images/{image_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\AddImageTagResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\AddImageTagRequest', + $asyncRequest = true); + } + + /** + * 批量添加镜像成员 + * + * 该接口为扩展接口,主要用于镜像共享时用户将多个镜像共享给多个用户。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchAddMembersAsync($request) + { + return $this->batchAddMembersAsyncWithHttpInfo($request); + } + + public function batchAddMembersAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchAddMembersResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequest', + $asyncRequest = true); + } + + /** + * 批量添加删除镜像标签 + * + * 该接口用于为指定镜像批量添加/更新、删除标签。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchAddOrDeleteTagsAsync($request) + { + return $this->batchAddOrDeleteTagsAsyncWithHttpInfo($request); + } + + public function batchAddOrDeleteTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/images/{image_id}/tags/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchAddOrDeleteTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchAddOrDeleteTagsRequest', + $asyncRequest = true); + } + + /** + * 批量删除镜像成员 + * + * 该接口为扩展接口,主要用于取消镜像共享。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchDeleteMembersAsync($request) + { + return $this->batchDeleteMembersAsyncWithHttpInfo($request); + } + + public function batchDeleteMembersAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchDeleteMembersResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchDeleteMembersRequest', + $asyncRequest = true); + } + + /** + * 批量更新镜像成员状态 + * + * 该接口为扩展接口,主要用于用户接受或者拒绝多个共享镜像时批量更新镜像成员的状态。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchUpdateMembersAsync($request) + { + return $this->batchUpdateMembersAsyncWithHttpInfo($request); + } + + public function batchUpdateMembersAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchUpdateMembersResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchUpdateMembersRequest', + $asyncRequest = true); + } + + /** + * 跨Region复制镜像 + * + * 该接口为扩展接口,用户在一个区域制作的私有镜像,可以通过跨Region复制镜像将镜像复制到其他区域,在其他区域发放相同类型的云服务器,帮助用户实现区域间的业务迁移。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。 + * 如何查询异步任务,请参见异步任务进度查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function copyImageCrossRegionAsync($request) + { + return $this->copyImageCrossRegionAsyncWithHttpInfo($request); + } + + public function copyImageCrossRegionAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/{image_id}/cross_region_copy'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CopyImageCrossRegionResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\CopyImageCrossRegionRequest', + $asyncRequest = true); + } + + /** + * Region内复制镜像 + * + * 该接口为扩展接口,主要用于用户将一个已有镜像复制为另一个镜像。复制镜像时,可以更改镜像的加密等属性,以满足不同的场景。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function copyImageInRegionAsync($request) + { + return $this->copyImageInRegionAsyncWithHttpInfo($request); + } + + public function copyImageInRegionAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/{image_id}/copy'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CopyImageInRegionResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\CopyImageInRegionRequest', + $asyncRequest = true); + } + + /** + * 使用外部镜像文件制作数据镜像 + * + * 使用上传至OBS桶中的外部数据卷镜像文件制作数据镜像。作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态。具体请参考异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createDataImageAsync($request) + { + return $this->createDataImageAsyncWithHttpInfo($request); + } + + public function createDataImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/dataimages/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateDataImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateDataImageRequest', + $asyncRequest = true); + } + + /** + * 制作镜像 + * + * 本接口用于制作私有镜像,支持: + * - 使用云服务器制作私有镜像。 + * - 使用上传至OBS桶中的外部镜像文件制作私有镜像。 + * - 使用数据卷制作系统盘镜像。 + * + * 作为异步接口,调用成功,只是说明云平台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。 + * + * 不同场景必选参数说明: + * + * - 使用云服务器制作镜像时的请求的必选参数:name,instance_id。 + * - 使用上传至OBS桶中的外部镜像文件时的请求必选参数:name,image_url,min_disk。 + * - 使用数据卷制作系统盘镜像时的请求必选参数:name,volume_id,os_version + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createImageAsync($request) + { + return $this->createImageAsyncWithHttpInfo($request); + } + + public function createImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/cloudimages/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateImageRequest', + $asyncRequest = true); + } + + /** + * 增加或修改标签 + * + * 该接口主要用于为某个镜像增加或修改一个自定义标签。通过自定义标签,用户可以将镜像进行分类。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createOrUpdateTagsAsync($request) + { + return $this->createOrUpdateTagsAsyncWithHttpInfo($request); + } + + public function createOrUpdateTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateOrUpdateTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateOrUpdateTagsRequest', + $asyncRequest = true); + } + + /** + * 制作整机镜像 + * + * 使用云服务器或者云服务器备份制作整机镜像。作为异步接口,调用成功,只是说明后台收到了制作整机镜像的请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createWholeImageAsync($request) + { + return $this->createWholeImageAsyncWithHttpInfo($request); + } + + public function createWholeImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/wholeimages/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateWholeImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateWholeImageRequest', + $asyncRequest = true); + } + + /** + * 删除镜像标签 + * + * 该接口用于为镜像删除指定的标签 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteImageTagAsync($request) + { + return $this->deleteImageTagAsyncWithHttpInfo($request); + } + + public function deleteImageTagAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/images/{image_id}/tags/{key}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['key'] !== null) { + $pathParams['key'] = $localVarParams['key']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\DeleteImageTagResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\DeleteImageTagRequest', + $asyncRequest = true); + } + + /** + * 导出镜像 + * + * 该接口为扩展接口,用于用户将自己的私有镜像导出到指定的OBS桶中。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function exportImageAsync($request) + { + return $this->exportImageAsyncWithHttpInfo($request); + } + + public function exportImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/{image_id}/file'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ExportImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ExportImageRequest', + $asyncRequest = true); + } + + /** + * 镜像文件快速导入 + * + * 使用上传至OBS桶中的超大外部镜像文件制作私有镜像,目前仅支持RAW或ZVHD2格式镜像文件。且要求镜像文件大小不能超过1TB。 + * 由于快速导入功能要求提前转换镜像文件格式为RAW或ZVHD2格式,因此镜像文件小于128GB时推荐您优先使用常规的创建私有镜像的方式。 + * 作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function importImageQuickAsync($request) + { + return $this->importImageQuickAsyncWithHttpInfo($request); + } + + public function importImageQuickAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/cloudimages/quickimport/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ImportImageQuickResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ImportImageQuickRequest', + $asyncRequest = true); + } + + /** + * 按标签查询镜像 + * + * 该接口用于按标签或其他条件对镜像进行过滤或者计数使用。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImageByTagsAsync($request) + { + return $this->listImageByTagsAsyncWithHttpInfo($request); + } + + public function listImageByTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/images/resource_instances/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json', 'application/json-1'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json', 'application/json-1'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImageByTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImageByTagsRequest', + $asyncRequest = true); + } + + /** + * 查询镜像标签 + * + * 该接口用于为查询指定镜像上的所有标签 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImageTagsAsync($request) + { + return $this->listImageTagsAsyncWithHttpInfo($request); + } + + public function listImageTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/images/{image_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImageTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImageTagsRequest', + $asyncRequest = true); + } + + /** + * 查询镜像列表 + * + * 根据不同条件查询镜像列表信息。 + * 可以在URI后面用‘?’和‘&’添加不同的查询条件组合,请参考请求样例。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImagesAsync($request) + { + return $this->listImagesAsyncWithHttpInfo($request); + } + + public function listImagesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/cloudimages'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imagetype'] !== null) { + $queryParams['__imagetype'] = $localVarParams['imagetype']; + } + if ($localVarParams['isregistered'] !== null) { + $queryParams['__isregistered'] = $localVarParams['isregistered']; + } + if ($localVarParams['osBit'] !== null) { + $queryParams['__os_bit'] = $localVarParams['osBit']; + } + if ($localVarParams['osType'] !== null) { + $queryParams['__os_type'] = $localVarParams['osType']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['__platform'] = $localVarParams['platform']; + } + if ($localVarParams['supportDiskintensive'] !== null) { + $queryParams['__support_diskintensive'] = $localVarParams['supportDiskintensive']; + } + if ($localVarParams['supportHighperformance'] !== null) { + $queryParams['__support_highperformance'] = $localVarParams['supportHighperformance']; + } + if ($localVarParams['supportKvm'] !== null) { + $queryParams['__support_kvm'] = $localVarParams['supportKvm']; + } + if ($localVarParams['supportKvmGpuType'] !== null) { + $queryParams['__support_kvm_gpu_type'] = $localVarParams['supportKvmGpuType']; + } + if ($localVarParams['supportKvmInfiniband'] !== null) { + $queryParams['__support_kvm_infiniband'] = $localVarParams['supportKvmInfiniband']; + } + if ($localVarParams['supportLargememory'] !== null) { + $queryParams['__support_largememory'] = $localVarParams['supportLargememory']; + } + if ($localVarParams['supportXen'] !== null) { + $queryParams['__support_xen'] = $localVarParams['supportXen']; + } + if ($localVarParams['supportXenGpuType'] !== null) { + $queryParams['__support_xen_gpu_type'] = $localVarParams['supportXenGpuType']; + } + if ($localVarParams['supportXenHana'] !== null) { + $queryParams['__support_xen_hana'] = $localVarParams['supportXenHana']; + } + if ($localVarParams['containerFormat'] !== null) { + $queryParams['container_format'] = $localVarParams['containerFormat']; + } + if ($localVarParams['diskFormat'] !== null) { + $queryParams['disk_format'] = $localVarParams['diskFormat']; + } + if ($localVarParams['enterpriseProjectId'] !== null) { + $queryParams['enterprise_project_id'] = $localVarParams['enterpriseProjectId']; + } + if ($localVarParams['id'] !== null) { + $queryParams['id'] = $localVarParams['id']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['marker'] !== null) { + $queryParams['marker'] = $localVarParams['marker']; + } + if ($localVarParams['memberStatus'] !== null) { + $queryParams['member_status'] = $localVarParams['memberStatus']; + } + if ($localVarParams['minDisk'] !== null) { + $queryParams['min_disk'] = $localVarParams['minDisk']; + } + if ($localVarParams['minRam'] !== null) { + $queryParams['min_ram'] = $localVarParams['minRam']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['owner'] !== null) { + $queryParams['owner'] = $localVarParams['owner']; + } + if ($localVarParams['protected'] !== null) { + $queryParams['protected'] = $localVarParams['protected']; + } + if ($localVarParams['sortDir'] !== null) { + $queryParams['sort_dir'] = $localVarParams['sortDir']; + } + if ($localVarParams['sortKey'] !== null) { + $queryParams['sort_key'] = $localVarParams['sortKey']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['tag'] !== null) { + $queryParams['tag'] = $localVarParams['tag']; + } + if ($localVarParams['virtualEnvType'] !== null) { + $queryParams['virtual_env_type'] = $localVarParams['virtualEnvType']; + } + if ($localVarParams['visibility'] !== null) { + $queryParams['visibility'] = $localVarParams['visibility']; + } + if ($localVarParams['flavorId'] !== null) { + $queryParams['flavor_id'] = $localVarParams['flavorId']; + } + if ($localVarParams['createdAt'] !== null) { + $queryParams['created_at'] = $localVarParams['createdAt']; + } + if ($localVarParams['updatedAt'] !== null) { + $queryParams['updated_at'] = $localVarParams['updatedAt']; + } + if ($localVarParams['architecture'] !== null) { + $queryParams['architecture'] = $localVarParams['architecture']; + } + if ($localVarParams['xSdkDate'] !== null) { + $headerParams['x_sdk_date'] = $localVarParams['xSdkDate']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImagesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImagesRequest', + $asyncRequest = true); + } + + /** + * 查询租户所有镜像标签 + * + * 该接口用于为查询租户的所有镜像上的标签。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImagesTagsAsync($request) + { + return $this->listImagesTagsAsyncWithHttpInfo($request); + } + + public function listImagesTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/images/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImagesTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImagesTagsRequest', + $asyncRequest = true); + } + + /** + * 查询镜像支持的OS列表 + * + * 查询当前区域弹性云服务器的OS兼容性列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listOsVersionsAsync($request) + { + return $this->listOsVersionsAsyncWithHttpInfo($request); + } + + public function listOsVersionsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/os_version'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['tag'] !== null) { + $queryParams['tag'] = $localVarParams['tag']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListOsVersionsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListOsVersionsRequest', + $asyncRequest = true); + } + + /** + * 按条件查询租户镜像标签列表 + * + * 根据不同条件查询镜像标签列表信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTagsAsync($request) + { + return $this->listTagsAsyncWithHttpInfo($request); + } + + public function listTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['page'] !== null) { + $queryParams['page'] = $localVarParams['page']; + } + if ($localVarParams['imagetype'] !== null) { + $queryParams['__imagetype'] = $localVarParams['imagetype']; + } + if ($localVarParams['id'] !== null) { + $queryParams['id'] = $localVarParams['id']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['minDisk'] !== null) { + $queryParams['min_disk'] = $localVarParams['minDisk']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['__platform'] = $localVarParams['platform']; + } + if ($localVarParams['osType'] !== null) { + $queryParams['__os_type'] = $localVarParams['osType']; + } + if ($localVarParams['memberStatus'] !== null) { + $queryParams['member_status'] = $localVarParams['memberStatus']; + } + if ($localVarParams['virtualEnvType'] !== null) { + $queryParams['virtual_env_type'] = $localVarParams['virtualEnvType']; + } + if ($localVarParams['enterpriseProjectId'] !== null) { + $queryParams['enterprise_project_id'] = $localVarParams['enterpriseProjectId']; + } + if ($localVarParams['architecture'] !== null) { + $queryParams['architecture'] = $localVarParams['architecture']; + } + if ($localVarParams['createdAt'] !== null) { + $queryParams['created_at'] = $localVarParams['createdAt']; + } + if ($localVarParams['updatedAt'] !== null) { + $queryParams['updated_at'] = $localVarParams['updatedAt']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListTagsRequest', + $asyncRequest = true); + } + + /** + * 注册镜像 + * + * 该接口用于将镜像文件注册为云平台未初始化的私有镜像。 + * 使用该接口注册镜像的具体步骤如下: + * 将镜像文件上传到OBS个人桶中。具体操作请参见《对象存储服务客户端指南(OBS Browser)》或《对象存储服务API参考》。 + * 使用创建镜像元数据接口创建镜像元数据。调用成功后,保存该镜像的ID。创建镜像元数据请参考创建镜像元数据(OpenStack原生)。 + * 根据2得到的镜像ID,使用注册镜像接口注册OBS桶中的镜像文件。 + * 注册镜像接口作为异步接口,调用成功后,说明后台收到了注册请求。需要根据镜像ID查询该镜像状态验证镜像注册是否成功。当镜像状态变为“active”时,表示镜像注册成功。 + * 如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function registerImageAsync($request) + { + return $this->registerImageAsyncWithHttpInfo($request); + } + + public function registerImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/{image_id}/upload'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\RegisterImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\RegisterImageRequest', + $asyncRequest = true); + } + + /** + * 查询镜像配额 + * + * 该接口为扩展接口,主要用于查询租户在当前Region的私有镜像的配额数量。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showImageQuotaAsync($request) + { + return $this->showImageQuotaAsyncWithHttpInfo($request); + } + + public function showImageQuotaAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/quota'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowImageQuotaResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowImageQuotaRequest', + $asyncRequest = true); + } + + /** + * 查询job状态 + * + * 该接口为扩展接口,主要用于查询异步接口执行情况,比如查询导出镜像任务的执行状态。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showJobAsync($request) + { + return $this->showJobAsyncWithHttpInfo($request); + } + + public function showJobAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/{project_id}/jobs/{job_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['jobId'] !== null) { + $pathParams['job_id'] = $localVarParams['jobId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowJobResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowJobRequest', + $asyncRequest = true); + } + + /** + * 异步任务进度查询 + * + * 该接口为扩展接口,主要用于查询异步任务进度。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showJobProgressAsync($request) + { + return $this->showJobProgressAsyncWithHttpInfo($request); + } + + public function showJobProgressAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v1/cloudimages/job/{job_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['jobId'] !== null) { + $pathParams['job_id'] = $localVarParams['jobId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowJobProgressResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowJobProgressRequest', + $asyncRequest = true); + } + + /** + * 更新镜像信息 + * + * 更新镜像信息接口,主要用于镜像属性的修改。当前仅支持可用(active)状态的镜像更新相关信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateImageAsync($request) + { + return $this->updateImageAsyncWithHttpInfo($request); + } + + public function updateImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/cloudimages/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PATCH', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\UpdateImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\UpdateImageRequest', + $asyncRequest = true); + } + + /** + * 查询版本列表(OpenStack原生) + * + * 查询API的版本信息列表,包括API的版本兼容性、域名信息等。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listVersionsAsync($request) + { + return $this->listVersionsAsyncWithHttpInfo($request); + } + + public function listVersionsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListVersionsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListVersionsRequest', + $asyncRequest = true); + } + + /** + * 查询版本列表(OpenStack原生) + * + * 查询API的版本信息列表,包括API的版本兼容性、域名信息等。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showVersionAsync($request) + { + return $this->showVersionAsyncWithHttpInfo($request); + } + + public function showVersionAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/{version}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['version'] !== null) { + $pathParams['version'] = $localVarParams['version']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowVersionResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowVersionRequest', + $asyncRequest = true); + } + + /** + * 添加镜像成员(OpenStack原生) + * + * 用户共享镜像给其他用户时,使用该接口向该镜像成员中添加接受镜像用户的项目ID。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceAddImageMemberAsync($request) + { + return $this->glanceAddImageMemberAsyncWithHttpInfo($request); + } + + public function glanceAddImageMemberAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceAddImageMemberResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceAddImageMemberRequest', + $asyncRequest = true); + } + + /** + * 创建镜像元数据(OpenStack原生) + * + * 创建镜像元数据。调用创建镜像元数据接口成功后,只是创建了镜像的元数据,镜像对应的实际镜像文件并不存在 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceCreateImageMetadataAsync($request) + { + return $this->glanceCreateImageMetadataAsyncWithHttpInfo($request); + } + + public function glanceCreateImageMetadataAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateImageMetadataResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateImageMetadataRequest', + $asyncRequest = true); + } + + /** + * 增加标签(OpenStack原生) + * + * 该接口主要用于为某个镜像添加一个自定义标签。通过自定义标签,用户可以将镜像进行分类。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceCreateTagAsync($request) + { + return $this->glanceCreateTagAsyncWithHttpInfo($request); + } + + public function glanceCreateTagAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}/tags/{tag}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['tag'] !== null) { + $pathParams['tag'] = $localVarParams['tag']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateTagResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateTagRequest', + $asyncRequest = true); + } + + /** + * 删除镜像(OpenStack原生) + * + * 该接口主要用于删除镜像,用户可以通过该接口将自己的私有镜像删除。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceDeleteImageAsync($request) + { + return $this->glanceDeleteImageAsyncWithHttpInfo($request); + } + + public function glanceDeleteImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageRequest', + $asyncRequest = true); + } + + /** + * 删除指定的镜像成员(OpenStack原生) + * + * 该接口用于取消对某个用户的镜像共享。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceDeleteImageMemberAsync($request) + { + return $this->glanceDeleteImageMemberAsyncWithHttpInfo($request); + } + + public function glanceDeleteImageMemberAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}/members/{member_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['memberId'] !== null) { + $pathParams['member_id'] = $localVarParams['memberId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageMemberResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageMemberRequest', + $asyncRequest = true); + } + + /** + * 删除标签(OpenStack原生) + * + * 该接口主要用于删除某个镜像的自定义标签,通过该接口,用户可以将私有镜像中一些不用的标签删除。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceDeleteTagAsync($request) + { + return $this->glanceDeleteTagAsyncWithHttpInfo($request); + } + + public function glanceDeleteTagAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}/tags/{tag}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['tag'] !== null) { + $pathParams['tag'] = $localVarParams['tag']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteTagResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteTagRequest', + $asyncRequest = true); + } + + /** + * 查询镜像成员列表视图(OpenStack原生) + * + * 该接口主要用于查询镜像成员列表视图,通过视图,用户可以了解到镜像成员包含哪些属性,同时也可以了解每个属性的数据类型。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImageMemberSchemasAsync($request) + { + return $this->glanceListImageMemberSchemasAsyncWithHttpInfo($request); + } + + public function glanceListImageMemberSchemasAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/schemas/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMemberSchemasResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMemberSchemasRequest', + $asyncRequest = true); + } + + /** + * 获取镜像成员列表(OpenStack原生) + * + * 该接口用于共享镜像过程中,获取接受该镜像的成员列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImageMembersAsync($request) + { + return $this->glanceListImageMembersAsyncWithHttpInfo($request); + } + + public function glanceListImageMembersAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMembersResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMembersRequest', + $asyncRequest = true); + } + + /** + * 查询镜像列表视图(OpenStack原生) + * + * 该接口主要用于查询镜像列表视图,通过该接口用户可以了解到镜像列表的详细情况和数据结构。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImageSchemasAsync($request) + { + return $this->glanceListImageSchemasAsyncWithHttpInfo($request); + } + + public function glanceListImageSchemasAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/schemas/images'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageSchemasResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageSchemasRequest', + $asyncRequest = true); + } + + /** + * 查询镜像列表(OpenStack原生) + * + * 获取镜像列表。 + * 使用本接口查询镜像列表时,需要使用分页查询才能返回全部的镜像列表。 + * 分页说明 + * 分页是指返回一组镜像的一个子集,在返回的时候会存在下个子集的链接和首个子集的链接,默认返回的子集中数量为25,用户也可以通过使用limit和marker两个参数自己分页,指定返回子集中需要返回的数量。 + * 响应中的参数first是查询首页的URL。next是查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImagesAsync($request) + { + return $this->glanceListImagesAsyncWithHttpInfo($request); + } + + public function glanceListImagesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imagetype'] !== null) { + $queryParams['__imagetype'] = $localVarParams['imagetype']; + } + if ($localVarParams['isregistered'] !== null) { + $queryParams['__isregistered'] = $localVarParams['isregistered']; + } + if ($localVarParams['osBit'] !== null) { + $queryParams['__os_bit'] = $localVarParams['osBit']; + } + if ($localVarParams['osType'] !== null) { + $queryParams['__os_type'] = $localVarParams['osType']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['__platform'] = $localVarParams['platform']; + } + if ($localVarParams['supportDiskintensive'] !== null) { + $queryParams['__support_diskintensive'] = $localVarParams['supportDiskintensive']; + } + if ($localVarParams['supportHighperformance'] !== null) { + $queryParams['__support_highperformance'] = $localVarParams['supportHighperformance']; + } + if ($localVarParams['supportKvm'] !== null) { + $queryParams['__support_kvm'] = $localVarParams['supportKvm']; + } + if ($localVarParams['supportKvmGpuType'] !== null) { + $queryParams['__support_kvm_gpu_type'] = $localVarParams['supportKvmGpuType']; + } + if ($localVarParams['supportKvmInfiniband'] !== null) { + $queryParams['__support_kvm_infiniband'] = $localVarParams['supportKvmInfiniband']; + } + if ($localVarParams['supportLargememory'] !== null) { + $queryParams['__support_largememory'] = $localVarParams['supportLargememory']; + } + if ($localVarParams['supportXen'] !== null) { + $queryParams['__support_xen'] = $localVarParams['supportXen']; + } + if ($localVarParams['supportXenGpuType'] !== null) { + $queryParams['__support_xen_gpu_type'] = $localVarParams['supportXenGpuType']; + } + if ($localVarParams['supportXenHana'] !== null) { + $queryParams['__support_xen_hana'] = $localVarParams['supportXenHana']; + } + if ($localVarParams['containerFormat'] !== null) { + $queryParams['container_format'] = $localVarParams['containerFormat']; + } + if ($localVarParams['diskFormat'] !== null) { + $queryParams['disk_format'] = $localVarParams['diskFormat']; + } + if ($localVarParams['id'] !== null) { + $queryParams['id'] = $localVarParams['id']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['marker'] !== null) { + $queryParams['marker'] = $localVarParams['marker']; + } + if ($localVarParams['memberStatus'] !== null) { + $queryParams['member_status'] = $localVarParams['memberStatus']; + } + if ($localVarParams['minDisk'] !== null) { + $queryParams['min_disk'] = $localVarParams['minDisk']; + } + if ($localVarParams['minRam'] !== null) { + $queryParams['min_ram'] = $localVarParams['minRam']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['owner'] !== null) { + $queryParams['owner'] = $localVarParams['owner']; + } + if ($localVarParams['protected'] !== null) { + $queryParams['protected'] = $localVarParams['protected']; + } + if ($localVarParams['sortDir'] !== null) { + $queryParams['sort_dir'] = $localVarParams['sortDir']; + } + if ($localVarParams['sortKey'] !== null) { + $queryParams['sort_key'] = $localVarParams['sortKey']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['tag'] !== null) { + $queryParams['tag'] = $localVarParams['tag']; + } + if ($localVarParams['visibility'] !== null) { + $queryParams['visibility'] = $localVarParams['visibility']; + } + if ($localVarParams['createdAt'] !== null) { + $queryParams['created_at'] = $localVarParams['createdAt']; + } + if ($localVarParams['updatedAt'] !== null) { + $queryParams['updated_at'] = $localVarParams['updatedAt']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImagesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImagesRequest', + $asyncRequest = true); + } + + /** + * 查询镜像详情(OpenStack原生) + * + * 查询单个镜像详情,用户可以通过该接口查询单个私有或者公共镜像的详情 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImageAsync($request) + { + return $this->glanceShowImageAsyncWithHttpInfo($request); + } + + public function glanceShowImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageRequest', + $asyncRequest = true); + } + + /** + * 获取镜像成员详情(OpenStack原生) + * + * 该接口主要用于镜像共享中查询某个镜像成员的详情。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImageMemberAsync($request) + { + return $this->glanceShowImageMemberAsyncWithHttpInfo($request); + } + + public function glanceShowImageMemberAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}/members/{member_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['memberId'] !== null) { + $pathParams['member_id'] = $localVarParams['memberId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberRequest', + $asyncRequest = true); + } + + /** + * 查询镜像成员视图(OpenStack原生) + * + * 该接口主要用于查询镜像成员视图,通过视图,用户可以了解到镜像成员包含哪些属性,同时也可以了解每个属性的数据类型。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImageMemberSchemasAsync($request) + { + return $this->glanceShowImageMemberSchemasAsyncWithHttpInfo($request); + } + + public function glanceShowImageMemberSchemasAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/schemas/member'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberSchemasResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberSchemasRequest', + $asyncRequest = true); + } + + /** + * 查询镜像视图(OpenStack原生) + * + * 该接口主要用于查询镜像视图,通过视图,用户可以了解到镜像包含哪些属性,同时也可以了解每个属性的数据类型等。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImageSchemasAsync($request) + { + return $this->glanceShowImageSchemasAsyncWithHttpInfo($request); + } + + public function glanceShowImageSchemasAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/schemas/image'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageSchemasResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageSchemasRequest', + $asyncRequest = true); + } + + /** + * 更新镜像信息(OpenStack原生) + * + * 修改镜像信息 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceUpdateImageAsync($request) + { + return $this->glanceUpdateImageAsyncWithHttpInfo($request); + } + + public function glanceUpdateImageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/openstack-images-v2.1-json-patch', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/openstack-images-v2.1-json-patch', 'application/json'], + ['application/openstack-images-v2.1-json-patch'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PATCH', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageRequest', + $asyncRequest = true); + } + + /** + * 更新镜像成员状态(OpenStack原生) + * + * 用户接受或者拒绝共享镜像时,使用该接口更新镜像成员的状态。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceUpdateImageMemberAsync($request) + { + return $this->glanceUpdateImageMemberAsyncWithHttpInfo($request); + } + + public function glanceUpdateImageMemberAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/images/{image_id}/members/{member_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['memberId'] !== null) { + $pathParams['member_id'] = $localVarParams['memberId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageMemberResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageMemberRequest', + $asyncRequest = true); + } + + protected function callApi( + $method, + $resourcePath, + $pathParams=null, + $queryParams=null, + $headerParams=null, + $body=null, + $multipart=null, + $postParams=null, + $responseType=null, + $collectionFormats=null, + $requestType=null, + $asyncRequest = null) + { + return $this->doHttpRequest( + $method, + $resourcePath, + $pathParams, + $queryParams, + $headerParams, + $body, + $multipart, + $postParams, + $responseType, + $collectionFormats, + $requestType, + $asyncRequest); + } +} \ No newline at end of file diff --git a/Services/Ims/V2/ImsClient.php b/Services/Ims/V2/ImsClient.php new file mode 100755 index 0000000..07429ee --- /dev/null +++ b/Services/Ims/V2/ImsClient.php @@ -0,0 +1,3021 @@ +modelPackage = ModelInterface::class; + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + public static function newBuilder() + { + return new ClientBuilder(new ImsClient()); + } + + + /** + * 添加镜像标签 + * + * 该接口用于为指定镜像添加或更新指定的单个标签 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function addImageTag($request) + { + return $this->addImageTagWithHttpInfo($request); + } + + public function addImageTagWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/images/{image_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\AddImageTagResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\AddImageTagRequest'); + } + + /** + * 批量添加镜像成员 + * + * 该接口为扩展接口,主要用于镜像共享时用户将多个镜像共享给多个用户。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchAddMembers($request) + { + return $this->batchAddMembersWithHttpInfo($request); + } + + public function batchAddMembersWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchAddMembersResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequest'); + } + + /** + * 批量添加删除镜像标签 + * + * 该接口用于为指定镜像批量添加/更新、删除标签。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchAddOrDeleteTags($request) + { + return $this->batchAddOrDeleteTagsWithHttpInfo($request); + } + + public function batchAddOrDeleteTagsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/images/{image_id}/tags/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchAddOrDeleteTagsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchAddOrDeleteTagsRequest'); + } + + /** + * 批量删除镜像成员 + * + * 该接口为扩展接口,主要用于取消镜像共享。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchDeleteMembers($request) + { + return $this->batchDeleteMembersWithHttpInfo($request); + } + + public function batchDeleteMembersWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchDeleteMembersResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchDeleteMembersRequest'); + } + + /** + * 批量更新镜像成员状态 + * + * 该接口为扩展接口,主要用于用户接受或者拒绝多个共享镜像时批量更新镜像成员的状态。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchUpdateMembers($request) + { + return $this->batchUpdateMembersWithHttpInfo($request); + } + + public function batchUpdateMembersWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\BatchUpdateMembersResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\BatchUpdateMembersRequest'); + } + + /** + * 跨Region复制镜像 + * + * 该接口为扩展接口,用户在一个区域制作的私有镜像,可以通过跨Region复制镜像将镜像复制到其他区域,在其他区域发放相同类型的云服务器,帮助用户实现区域间的业务迁移。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。 + * 如何查询异步任务,请参见异步任务进度查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function copyImageCrossRegion($request) + { + return $this->copyImageCrossRegionWithHttpInfo($request); + } + + public function copyImageCrossRegionWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/{image_id}/cross_region_copy'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CopyImageCrossRegionResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\CopyImageCrossRegionRequest'); + } + + /** + * Region内复制镜像 + * + * 该接口为扩展接口,主要用于用户将一个已有镜像复制为另一个镜像。复制镜像时,可以更改镜像的加密等属性,以满足不同的场景。 + * 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function copyImageInRegion($request) + { + return $this->copyImageInRegionWithHttpInfo($request); + } + + public function copyImageInRegionWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/{image_id}/copy'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CopyImageInRegionResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\CopyImageInRegionRequest'); + } + + /** + * 使用外部镜像文件制作数据镜像 + * + * 使用上传至OBS桶中的外部数据卷镜像文件制作数据镜像。作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态。具体请参考异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createDataImage($request) + { + return $this->createDataImageWithHttpInfo($request); + } + + public function createDataImageWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/dataimages/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateDataImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateDataImageRequest'); + } + + /** + * 制作镜像 + * + * 本接口用于制作私有镜像,支持: + * - 使用云服务器制作私有镜像。 + * - 使用上传至OBS桶中的外部镜像文件制作私有镜像。 + * - 使用数据卷制作系统盘镜像。 + * + * 作为异步接口,调用成功,只是说明云平台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。 + * + * 不同场景必选参数说明: + * + * - 使用云服务器制作镜像时的请求的必选参数:name,instance_id。 + * - 使用上传至OBS桶中的外部镜像文件时的请求必选参数:name,image_url,min_disk。 + * - 使用数据卷制作系统盘镜像时的请求必选参数:name,volume_id,os_version + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createImage($request) + { + return $this->createImageWithHttpInfo($request); + } + + public function createImageWithHttpInfo($request) + { + $resourcePath = '/v2/cloudimages/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateImageRequest'); + } + + /** + * 增加或修改标签 + * + * 该接口主要用于为某个镜像增加或修改一个自定义标签。通过自定义标签,用户可以将镜像进行分类。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createOrUpdateTags($request) + { + return $this->createOrUpdateTagsWithHttpInfo($request); + } + + public function createOrUpdateTagsWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateOrUpdateTagsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateOrUpdateTagsRequest'); + } + + /** + * 制作整机镜像 + * + * 使用云服务器或者云服务器备份制作整机镜像。作为异步接口,调用成功,只是说明后台收到了制作整机镜像的请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createWholeImage($request) + { + return $this->createWholeImageWithHttpInfo($request); + } + + public function createWholeImageWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/wholeimages/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\CreateWholeImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\CreateWholeImageRequest'); + } + + /** + * 删除镜像标签 + * + * 该接口用于为镜像删除指定的标签 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteImageTag($request) + { + return $this->deleteImageTagWithHttpInfo($request); + } + + public function deleteImageTagWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/images/{image_id}/tags/{key}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['key'] !== null) { + $pathParams['key'] = $localVarParams['key']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\DeleteImageTagResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\DeleteImageTagRequest'); + } + + /** + * 导出镜像 + * + * 该接口为扩展接口,用于用户将自己的私有镜像导出到指定的OBS桶中。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function exportImage($request) + { + return $this->exportImageWithHttpInfo($request); + } + + public function exportImageWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/{image_id}/file'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ExportImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ExportImageRequest'); + } + + /** + * 镜像文件快速导入 + * + * 使用上传至OBS桶中的超大外部镜像文件制作私有镜像,目前仅支持RAW或ZVHD2格式镜像文件。且要求镜像文件大小不能超过1TB。 + * 由于快速导入功能要求提前转换镜像文件格式为RAW或ZVHD2格式,因此镜像文件小于128GB时推荐您优先使用常规的创建私有镜像的方式。 + * 作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function importImageQuick($request) + { + return $this->importImageQuickWithHttpInfo($request); + } + + public function importImageQuickWithHttpInfo($request) + { + $resourcePath = '/v2/cloudimages/quickimport/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ImportImageQuickResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ImportImageQuickRequest'); + } + + /** + * 按标签查询镜像 + * + * 该接口用于按标签或其他条件对镜像进行过滤或者计数使用。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImageByTags($request) + { + return $this->listImageByTagsWithHttpInfo($request); + } + + public function listImageByTagsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/images/resource_instances/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json', 'application/json-1'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json', 'application/json-1'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImageByTagsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImageByTagsRequest'); + } + + /** + * 查询镜像标签 + * + * 该接口用于为查询指定镜像上的所有标签 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImageTags($request) + { + return $this->listImageTagsWithHttpInfo($request); + } + + public function listImageTagsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/images/{image_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImageTagsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImageTagsRequest'); + } + + /** + * 查询镜像列表 + * + * 根据不同条件查询镜像列表信息。 + * 可以在URI后面用‘?’和‘&’添加不同的查询条件组合,请参考请求样例。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImages($request) + { + return $this->listImagesWithHttpInfo($request); + } + + public function listImagesWithHttpInfo($request) + { + $resourcePath = '/v2/cloudimages'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imagetype'] !== null) { + $queryParams['__imagetype'] = $localVarParams['imagetype']; + } + if ($localVarParams['isregistered'] !== null) { + $queryParams['__isregistered'] = $localVarParams['isregistered']; + } + if ($localVarParams['osBit'] !== null) { + $queryParams['__os_bit'] = $localVarParams['osBit']; + } + if ($localVarParams['osType'] !== null) { + $queryParams['__os_type'] = $localVarParams['osType']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['__platform'] = $localVarParams['platform']; + } + if ($localVarParams['supportDiskintensive'] !== null) { + $queryParams['__support_diskintensive'] = $localVarParams['supportDiskintensive']; + } + if ($localVarParams['supportHighperformance'] !== null) { + $queryParams['__support_highperformance'] = $localVarParams['supportHighperformance']; + } + if ($localVarParams['supportKvm'] !== null) { + $queryParams['__support_kvm'] = $localVarParams['supportKvm']; + } + if ($localVarParams['supportKvmGpuType'] !== null) { + $queryParams['__support_kvm_gpu_type'] = $localVarParams['supportKvmGpuType']; + } + if ($localVarParams['supportKvmInfiniband'] !== null) { + $queryParams['__support_kvm_infiniband'] = $localVarParams['supportKvmInfiniband']; + } + if ($localVarParams['supportLargememory'] !== null) { + $queryParams['__support_largememory'] = $localVarParams['supportLargememory']; + } + if ($localVarParams['supportXen'] !== null) { + $queryParams['__support_xen'] = $localVarParams['supportXen']; + } + if ($localVarParams['supportXenGpuType'] !== null) { + $queryParams['__support_xen_gpu_type'] = $localVarParams['supportXenGpuType']; + } + if ($localVarParams['supportXenHana'] !== null) { + $queryParams['__support_xen_hana'] = $localVarParams['supportXenHana']; + } + if ($localVarParams['containerFormat'] !== null) { + $queryParams['container_format'] = $localVarParams['containerFormat']; + } + if ($localVarParams['diskFormat'] !== null) { + $queryParams['disk_format'] = $localVarParams['diskFormat']; + } + if ($localVarParams['enterpriseProjectId'] !== null) { + $queryParams['enterprise_project_id'] = $localVarParams['enterpriseProjectId']; + } + if ($localVarParams['id'] !== null) { + $queryParams['id'] = $localVarParams['id']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['marker'] !== null) { + $queryParams['marker'] = $localVarParams['marker']; + } + if ($localVarParams['memberStatus'] !== null) { + $queryParams['member_status'] = $localVarParams['memberStatus']; + } + if ($localVarParams['minDisk'] !== null) { + $queryParams['min_disk'] = $localVarParams['minDisk']; + } + if ($localVarParams['minRam'] !== null) { + $queryParams['min_ram'] = $localVarParams['minRam']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['owner'] !== null) { + $queryParams['owner'] = $localVarParams['owner']; + } + if ($localVarParams['protected'] !== null) { + $queryParams['protected'] = $localVarParams['protected']; + } + if ($localVarParams['sortDir'] !== null) { + $queryParams['sort_dir'] = $localVarParams['sortDir']; + } + if ($localVarParams['sortKey'] !== null) { + $queryParams['sort_key'] = $localVarParams['sortKey']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['tag'] !== null) { + $queryParams['tag'] = $localVarParams['tag']; + } + if ($localVarParams['virtualEnvType'] !== null) { + $queryParams['virtual_env_type'] = $localVarParams['virtualEnvType']; + } + if ($localVarParams['visibility'] !== null) { + $queryParams['visibility'] = $localVarParams['visibility']; + } + if ($localVarParams['flavorId'] !== null) { + $queryParams['flavor_id'] = $localVarParams['flavorId']; + } + if ($localVarParams['createdAt'] !== null) { + $queryParams['created_at'] = $localVarParams['createdAt']; + } + if ($localVarParams['updatedAt'] !== null) { + $queryParams['updated_at'] = $localVarParams['updatedAt']; + } + if ($localVarParams['architecture'] !== null) { + $queryParams['architecture'] = $localVarParams['architecture']; + } + if ($localVarParams['xSdkDate'] !== null) { + $headerParams[$arr['xSdkDate']] = $localVarParams['xSdkDate']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImagesResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImagesRequest'); + } + + /** + * 查询租户所有镜像标签 + * + * 该接口用于为查询租户的所有镜像上的标签。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listImagesTags($request) + { + return $this->listImagesTagsWithHttpInfo($request); + } + + public function listImagesTagsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/images/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListImagesTagsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListImagesTagsRequest'); + } + + /** + * 查询镜像支持的OS列表 + * + * 查询当前区域弹性云服务器的OS兼容性列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listOsVersions($request) + { + return $this->listOsVersionsWithHttpInfo($request); + } + + public function listOsVersionsWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/os_version'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['tag'] !== null) { + $queryParams['tag'] = $localVarParams['tag']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListOsVersionsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListOsVersionsRequest'); + } + + /** + * 按条件查询租户镜像标签列表 + * + * 根据不同条件查询镜像标签列表信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTags($request) + { + return $this->listTagsWithHttpInfo($request); + } + + public function listTagsWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['page'] !== null) { + $queryParams['page'] = $localVarParams['page']; + } + if ($localVarParams['imagetype'] !== null) { + $queryParams['__imagetype'] = $localVarParams['imagetype']; + } + if ($localVarParams['id'] !== null) { + $queryParams['id'] = $localVarParams['id']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['minDisk'] !== null) { + $queryParams['min_disk'] = $localVarParams['minDisk']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['__platform'] = $localVarParams['platform']; + } + if ($localVarParams['osType'] !== null) { + $queryParams['__os_type'] = $localVarParams['osType']; + } + if ($localVarParams['memberStatus'] !== null) { + $queryParams['member_status'] = $localVarParams['memberStatus']; + } + if ($localVarParams['virtualEnvType'] !== null) { + $queryParams['virtual_env_type'] = $localVarParams['virtualEnvType']; + } + if ($localVarParams['enterpriseProjectId'] !== null) { + $queryParams['enterprise_project_id'] = $localVarParams['enterpriseProjectId']; + } + if ($localVarParams['architecture'] !== null) { + $queryParams['architecture'] = $localVarParams['architecture']; + } + if ($localVarParams['createdAt'] !== null) { + $queryParams['created_at'] = $localVarParams['createdAt']; + } + if ($localVarParams['updatedAt'] !== null) { + $queryParams['updated_at'] = $localVarParams['updatedAt']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListTagsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListTagsRequest'); + } + + /** + * 注册镜像 + * + * 该接口用于将镜像文件注册为云平台未初始化的私有镜像。 + * 使用该接口注册镜像的具体步骤如下: + * 将镜像文件上传到OBS个人桶中。具体操作请参见《对象存储服务客户端指南(OBS Browser)》或《对象存储服务API参考》。 + * 使用创建镜像元数据接口创建镜像元数据。调用成功后,保存该镜像的ID。创建镜像元数据请参考创建镜像元数据(OpenStack原生)。 + * 根据2得到的镜像ID,使用注册镜像接口注册OBS桶中的镜像文件。 + * 注册镜像接口作为异步接口,调用成功后,说明后台收到了注册请求。需要根据镜像ID查询该镜像状态验证镜像注册是否成功。当镜像状态变为“active”时,表示镜像注册成功。 + * 如何查询异步任务,请参见异步任务查询。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function registerImage($request) + { + return $this->registerImageWithHttpInfo($request); + } + + public function registerImageWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/{image_id}/upload'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\RegisterImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\RegisterImageRequest'); + } + + /** + * 查询镜像配额 + * + * 该接口为扩展接口,主要用于查询租户在当前Region的私有镜像的配额数量。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showImageQuota($request) + { + return $this->showImageQuotaWithHttpInfo($request); + } + + public function showImageQuotaWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/quota'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowImageQuotaResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowImageQuotaRequest'); + } + + /** + * 查询job状态 + * + * 该接口为扩展接口,主要用于查询异步接口执行情况,比如查询导出镜像任务的执行状态。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showJob($request) + { + return $this->showJobWithHttpInfo($request); + } + + public function showJobWithHttpInfo($request) + { + $resourcePath = '/v1/{project_id}/jobs/{job_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['jobId'] !== null) { + $pathParams['job_id'] = $localVarParams['jobId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowJobResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowJobRequest'); + } + + /** + * 异步任务进度查询 + * + * 该接口为扩展接口,主要用于查询异步任务进度。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showJobProgress($request) + { + return $this->showJobProgressWithHttpInfo($request); + } + + public function showJobProgressWithHttpInfo($request) + { + $resourcePath = '/v1/cloudimages/job/{job_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['jobId'] !== null) { + $pathParams['job_id'] = $localVarParams['jobId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowJobProgressResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowJobProgressRequest'); + } + + /** + * 更新镜像信息 + * + * 更新镜像信息接口,主要用于镜像属性的修改。当前仅支持可用(active)状态的镜像更新相关信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateImage($request) + { + return $this->updateImageWithHttpInfo($request); + } + + public function updateImageWithHttpInfo($request) + { + $resourcePath = '/v2/cloudimages/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PATCH', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\UpdateImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\UpdateImageRequest'); + } + + /** + * 查询版本列表(OpenStack原生) + * + * 查询API的版本信息列表,包括API的版本兼容性、域名信息等。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listVersions($request) + { + return $this->listVersionsWithHttpInfo($request); + } + + public function listVersionsWithHttpInfo($request) + { + $resourcePath = '/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ListVersionsResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ListVersionsRequest'); + } + + /** + * 查询版本列表(OpenStack原生) + * + * 查询API的版本信息列表,包括API的版本兼容性、域名信息等。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function showVersion($request) + { + return $this->showVersionWithHttpInfo($request); + } + + public function showVersionWithHttpInfo($request) + { + $resourcePath = '/{version}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['version'] !== null) { + $pathParams['version'] = $localVarParams['version']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\ShowVersionResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\ShowVersionRequest'); + } + + /** + * 添加镜像成员(OpenStack原生) + * + * 用户共享镜像给其他用户时,使用该接口向该镜像成员中添加接受镜像用户的项目ID。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceAddImageMember($request) + { + return $this->glanceAddImageMemberWithHttpInfo($request); + } + + public function glanceAddImageMemberWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceAddImageMemberResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceAddImageMemberRequest'); + } + + /** + * 创建镜像元数据(OpenStack原生) + * + * 创建镜像元数据。调用创建镜像元数据接口成功后,只是创建了镜像的元数据,镜像对应的实际镜像文件并不存在 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceCreateImageMetadata($request) + { + return $this->glanceCreateImageMetadataWithHttpInfo($request); + } + + public function glanceCreateImageMetadataWithHttpInfo($request) + { + $resourcePath = '/v2/images'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateImageMetadataResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateImageMetadataRequest'); + } + + /** + * 增加标签(OpenStack原生) + * + * 该接口主要用于为某个镜像添加一个自定义标签。通过自定义标签,用户可以将镜像进行分类。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceCreateTag($request) + { + return $this->glanceCreateTagWithHttpInfo($request); + } + + public function glanceCreateTagWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}/tags/{tag}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['tag'] !== null) { + $pathParams['tag'] = $localVarParams['tag']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateTagResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceCreateTagRequest'); + } + + /** + * 删除镜像(OpenStack原生) + * + * 该接口主要用于删除镜像,用户可以通过该接口将自己的私有镜像删除。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceDeleteImage($request) + { + return $this->glanceDeleteImageWithHttpInfo($request); + } + + public function glanceDeleteImageWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageRequest'); + } + + /** + * 删除指定的镜像成员(OpenStack原生) + * + * 该接口用于取消对某个用户的镜像共享。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceDeleteImageMember($request) + { + return $this->glanceDeleteImageMemberWithHttpInfo($request); + } + + public function glanceDeleteImageMemberWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}/members/{member_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['memberId'] !== null) { + $pathParams['member_id'] = $localVarParams['memberId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageMemberResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageMemberRequest'); + } + + /** + * 删除标签(OpenStack原生) + * + * 该接口主要用于删除某个镜像的自定义标签,通过该接口,用户可以将私有镜像中一些不用的标签删除。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceDeleteTag($request) + { + return $this->glanceDeleteTagWithHttpInfo($request); + } + + public function glanceDeleteTagWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}/tags/{tag}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['tag'] !== null) { + $pathParams['tag'] = $localVarParams['tag']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteTagResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteTagRequest'); + } + + /** + * 查询镜像成员列表视图(OpenStack原生) + * + * 该接口主要用于查询镜像成员列表视图,通过视图,用户可以了解到镜像成员包含哪些属性,同时也可以了解每个属性的数据类型。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImageMemberSchemas($request) + { + return $this->glanceListImageMemberSchemasWithHttpInfo($request); + } + + public function glanceListImageMemberSchemasWithHttpInfo($request) + { + $resourcePath = '/v2/schemas/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMemberSchemasResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMemberSchemasRequest'); + } + + /** + * 获取镜像成员列表(OpenStack原生) + * + * 该接口用于共享镜像过程中,获取接受该镜像的成员列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImageMembers($request) + { + return $this->glanceListImageMembersWithHttpInfo($request); + } + + public function glanceListImageMembersWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}/members'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMembersResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageMembersRequest'); + } + + /** + * 查询镜像列表视图(OpenStack原生) + * + * 该接口主要用于查询镜像列表视图,通过该接口用户可以了解到镜像列表的详细情况和数据结构。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImageSchemas($request) + { + return $this->glanceListImageSchemasWithHttpInfo($request); + } + + public function glanceListImageSchemasWithHttpInfo($request) + { + $resourcePath = '/v2/schemas/images'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageSchemasResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImageSchemasRequest'); + } + + /** + * 查询镜像列表(OpenStack原生) + * + * 获取镜像列表。 + * 使用本接口查询镜像列表时,需要使用分页查询才能返回全部的镜像列表。 + * 分页说明 + * 分页是指返回一组镜像的一个子集,在返回的时候会存在下个子集的链接和首个子集的链接,默认返回的子集中数量为25,用户也可以通过使用limit和marker两个参数自己分页,指定返回子集中需要返回的数量。 + * 响应中的参数first是查询首页的URL。next是查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceListImages($request) + { + return $this->glanceListImagesWithHttpInfo($request); + } + + public function glanceListImagesWithHttpInfo($request) + { + $resourcePath = '/v2/images'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imagetype'] !== null) { + $queryParams['__imagetype'] = $localVarParams['imagetype']; + } + if ($localVarParams['isregistered'] !== null) { + $queryParams['__isregistered'] = $localVarParams['isregistered']; + } + if ($localVarParams['osBit'] !== null) { + $queryParams['__os_bit'] = $localVarParams['osBit']; + } + if ($localVarParams['osType'] !== null) { + $queryParams['__os_type'] = $localVarParams['osType']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['__platform'] = $localVarParams['platform']; + } + if ($localVarParams['supportDiskintensive'] !== null) { + $queryParams['__support_diskintensive'] = $localVarParams['supportDiskintensive']; + } + if ($localVarParams['supportHighperformance'] !== null) { + $queryParams['__support_highperformance'] = $localVarParams['supportHighperformance']; + } + if ($localVarParams['supportKvm'] !== null) { + $queryParams['__support_kvm'] = $localVarParams['supportKvm']; + } + if ($localVarParams['supportKvmGpuType'] !== null) { + $queryParams['__support_kvm_gpu_type'] = $localVarParams['supportKvmGpuType']; + } + if ($localVarParams['supportKvmInfiniband'] !== null) { + $queryParams['__support_kvm_infiniband'] = $localVarParams['supportKvmInfiniband']; + } + if ($localVarParams['supportLargememory'] !== null) { + $queryParams['__support_largememory'] = $localVarParams['supportLargememory']; + } + if ($localVarParams['supportXen'] !== null) { + $queryParams['__support_xen'] = $localVarParams['supportXen']; + } + if ($localVarParams['supportXenGpuType'] !== null) { + $queryParams['__support_xen_gpu_type'] = $localVarParams['supportXenGpuType']; + } + if ($localVarParams['supportXenHana'] !== null) { + $queryParams['__support_xen_hana'] = $localVarParams['supportXenHana']; + } + if ($localVarParams['containerFormat'] !== null) { + $queryParams['container_format'] = $localVarParams['containerFormat']; + } + if ($localVarParams['diskFormat'] !== null) { + $queryParams['disk_format'] = $localVarParams['diskFormat']; + } + if ($localVarParams['id'] !== null) { + $queryParams['id'] = $localVarParams['id']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['marker'] !== null) { + $queryParams['marker'] = $localVarParams['marker']; + } + if ($localVarParams['memberStatus'] !== null) { + $queryParams['member_status'] = $localVarParams['memberStatus']; + } + if ($localVarParams['minDisk'] !== null) { + $queryParams['min_disk'] = $localVarParams['minDisk']; + } + if ($localVarParams['minRam'] !== null) { + $queryParams['min_ram'] = $localVarParams['minRam']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['owner'] !== null) { + $queryParams['owner'] = $localVarParams['owner']; + } + if ($localVarParams['protected'] !== null) { + $queryParams['protected'] = $localVarParams['protected']; + } + if ($localVarParams['sortDir'] !== null) { + $queryParams['sort_dir'] = $localVarParams['sortDir']; + } + if ($localVarParams['sortKey'] !== null) { + $queryParams['sort_key'] = $localVarParams['sortKey']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['tag'] !== null) { + $queryParams['tag'] = $localVarParams['tag']; + } + if ($localVarParams['visibility'] !== null) { + $queryParams['visibility'] = $localVarParams['visibility']; + } + if ($localVarParams['createdAt'] !== null) { + $queryParams['created_at'] = $localVarParams['createdAt']; + } + if ($localVarParams['updatedAt'] !== null) { + $queryParams['updated_at'] = $localVarParams['updatedAt']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImagesResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceListImagesRequest'); + } + + /** + * 查询镜像详情(OpenStack原生) + * + * 查询单个镜像详情,用户可以通过该接口查询单个私有或者公共镜像的详情 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImage($request) + { + return $this->glanceShowImageWithHttpInfo($request); + } + + public function glanceShowImageWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageRequest'); + } + + /** + * 获取镜像成员详情(OpenStack原生) + * + * 该接口主要用于镜像共享中查询某个镜像成员的详情。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImageMember($request) + { + return $this->glanceShowImageMemberWithHttpInfo($request); + } + + public function glanceShowImageMemberWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}/members/{member_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['memberId'] !== null) { + $pathParams['member_id'] = $localVarParams['memberId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberRequest'); + } + + /** + * 查询镜像成员视图(OpenStack原生) + * + * 该接口主要用于查询镜像成员视图,通过视图,用户可以了解到镜像成员包含哪些属性,同时也可以了解每个属性的数据类型。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImageMemberSchemas($request) + { + return $this->glanceShowImageMemberSchemasWithHttpInfo($request); + } + + public function glanceShowImageMemberSchemasWithHttpInfo($request) + { + $resourcePath = '/v2/schemas/member'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberSchemasResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageMemberSchemasRequest'); + } + + /** + * 查询镜像视图(OpenStack原生) + * + * 该接口主要用于查询镜像视图,通过视图,用户可以了解到镜像包含哪些属性,同时也可以了解每个属性的数据类型等。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceShowImageSchemas($request) + { + return $this->glanceShowImageSchemasWithHttpInfo($request); + } + + public function glanceShowImageSchemasWithHttpInfo($request) + { + $resourcePath = '/v2/schemas/image'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageSchemasResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageSchemasRequest'); + } + + /** + * 更新镜像信息(OpenStack原生) + * + * 修改镜像信息 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceUpdateImage($request) + { + return $this->glanceUpdateImageWithHttpInfo($request); + } + + public function glanceUpdateImageWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/openstack-images-v2.1-json-patch', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/openstack-images-v2.1-json-patch', 'application/json'], + ['application/openstack-images-v2.1-json-patch'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PATCH', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageRequest'); + } + + /** + * 更新镜像成员状态(OpenStack原生) + * + * 用户接受或者拒绝共享镜像时,使用该接口更新镜像成员的状态。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function glanceUpdateImageMember($request) + { + return $this->glanceUpdateImageMemberWithHttpInfo($request); + } + + public function glanceUpdateImageMemberWithHttpInfo($request) + { + $resourcePath = '/v2/images/{image_id}/members/{member_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['imageId'] !== null) { + $pathParams['image_id'] = $localVarParams['imageId']; + } + if ($localVarParams['memberId'] !== null) { + $pathParams['member_id'] = $localVarParams['memberId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageMemberResponse', + $requestType='\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageMemberRequest'); + } + + protected function callApi( + $method, + $resourcePath, + $pathParams = null, + $queryParams = null, + $headerParams = null, + $body = null, + $multipart = null, + $postParams = null, + $responseType = null, + $requestType = null) + { + return $this->doHttpRequest( + $method, + $resourcePath, + $pathParams, + $queryParams, + $headerParams, + $body, + $multipart, + $postParams, + $responseType, + $requestType); + } +} \ No newline at end of file diff --git a/Services/Ims/V2/Model/AddImageTagRequest.php b/Services/Ims/V2/Model/AddImageTagRequest.php new file mode 100755 index 0000000..dba15f6 --- /dev/null +++ b/Services/Ims/V2/Model/AddImageTagRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\AddImageTagRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\AddImageTagRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\AddImageTagRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/AddImageTagRequestBody.php b/Services/Ims/V2/Model/AddImageTagRequestBody.php new file mode 100755 index 0000000..6366281 --- /dev/null +++ b/Services/Ims/V2/Model/AddImageTagRequestBody.php @@ -0,0 +1,268 @@ + '\G42Cloud\SDK\Ims\V2\Model\ResourceTag' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tag tag + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tag tag + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tag tag + * + * @var string[] + */ + protected static $setters = [ + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tag tag + * + * @var string[] + */ + protected static $getters = [ + 'tag' => 'getTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['tag'] === null) { + $invalidProperties[] = "'tag' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tag + * tag + * + * @return \G42Cloud\SDK\Ims\V2\Model\ResourceTag + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param \G42Cloud\SDK\Ims\V2\Model\ResourceTag $tag tag + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/AddImageTagResponse.php b/Services/Ims/V2/Model/AddImageTagResponse.php new file mode 100755 index 0000000..6307f83 --- /dev/null +++ b/Services/Ims/V2/Model/AddImageTagResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/AddOrUpdateTagsRequestBody.php b/Services/Ims/V2/Model/AddOrUpdateTagsRequestBody.php new file mode 100755 index 0000000..2a96405 --- /dev/null +++ b/Services/Ims/V2/Model/AddOrUpdateTagsRequestBody.php @@ -0,0 +1,338 @@ + 'string', + 'tag' => 'string', + 'imageTag' => '\G42Cloud\SDK\Ims\V2\Model\ResourceTag' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 + * tag 标签数据。 tag和image_tag只能使用一个。 + * imageTag imageTag + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'tag' => null, + 'imageTag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 + * tag 标签数据。 tag和image_tag只能使用一个。 + * imageTag imageTag + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'tag' => 'tag', + 'imageTag' => 'image_tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 + * tag 标签数据。 tag和image_tag只能使用一个。 + * imageTag imageTag + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'tag' => 'setTag', + 'imageTag' => 'setImageTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 + * tag 标签数据。 tag和image_tag只能使用一个。 + * imageTag imageTag + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'tag' => 'getTag', + 'imageTag' => 'getImageTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['imageTag'] = isset($data['imageTag']) ? $data['imageTag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets tag + * 标签数据。 tag和image_tag只能使用一个。 + * + * @return string|null + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag 标签数据。 tag和image_tag只能使用一个。 + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Gets imageTag + * imageTag + * + * @return \G42Cloud\SDK\Ims\V2\Model\ResourceTag|null + */ + public function getImageTag() + { + return $this->container['imageTag']; + } + + /** + * Sets imageTag + * + * @param \G42Cloud\SDK\Ims\V2\Model\ResourceTag|null $imageTag imageTag + * + * @return $this + */ + public function setImageTag($imageTag) + { + $this->container['imageTag'] = $imageTag; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/AdditionalProperties.php b/Services/Ims/V2/Model/AdditionalProperties.php new file mode 100755 index 0000000..d1356e4 --- /dev/null +++ b/Services/Ims/V2/Model/AdditionalProperties.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * type 类型 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * type 类型 + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * type 类型 + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * type 类型 + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * 类型 + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type 类型 + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchAddMembersRequest.php b/Services/Ims/V2/Model/BatchAddMembersRequest.php new file mode 100755 index 0000000..bc3da37 --- /dev/null +++ b/Services/Ims/V2/Model/BatchAddMembersRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchAddMembersRequestBody.php b/Services/Ims/V2/Model/BatchAddMembersRequestBody.php new file mode 100755 index 0000000..3be84e0 --- /dev/null +++ b/Services/Ims/V2/Model/BatchAddMembersRequestBody.php @@ -0,0 +1,306 @@ + 'string[]', + 'projects' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * images 镜像ID列表 + * projects 项目ID列表 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'images' => null, + 'projects' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * images 镜像ID列表 + * projects 项目ID列表 + * + * @var string[] + */ + protected static $attributeMap = [ + 'images' => 'images', + 'projects' => 'projects' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * images 镜像ID列表 + * projects 项目ID列表 + * + * @var string[] + */ + protected static $setters = [ + 'images' => 'setImages', + 'projects' => 'setProjects' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * images 镜像ID列表 + * projects 项目ID列表 + * + * @var string[] + */ + protected static $getters = [ + 'images' => 'getImages', + 'projects' => 'getProjects' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['images'] = isset($data['images']) ? $data['images'] : null; + $this->container['projects'] = isset($data['projects']) ? $data['projects'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['images'] === null) { + $invalidProperties[] = "'images' can't be null"; + } + if ($this->container['projects'] === null) { + $invalidProperties[] = "'projects' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets images + * 镜像ID列表 + * + * @return string[] + */ + public function getImages() + { + return $this->container['images']; + } + + /** + * Sets images + * + * @param string[] $images 镜像ID列表 + * + * @return $this + */ + public function setImages($images) + { + $this->container['images'] = $images; + return $this; + } + + /** + * Gets projects + * 项目ID列表 + * + * @return string[] + */ + public function getProjects() + { + return $this->container['projects']; + } + + /** + * Sets projects + * + * @param string[] $projects 项目ID列表 + * + * @return $this + */ + public function setProjects($projects) + { + $this->container['projects'] = $projects; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchAddMembersResponse.php b/Services/Ims/V2/Model/BatchAddMembersResponse.php new file mode 100755 index 0000000..6fcbd89 --- /dev/null +++ b/Services/Ims/V2/Model/BatchAddMembersResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchAddOrDeleteTagsRequest.php b/Services/Ims/V2/Model/BatchAddOrDeleteTagsRequest.php new file mode 100755 index 0000000..1c74eea --- /dev/null +++ b/Services/Ims/V2/Model/BatchAddOrDeleteTagsRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\BatchAddOrDeleteTagsRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\BatchAddOrDeleteTagsRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\BatchAddOrDeleteTagsRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchAddOrDeleteTagsRequestBody.php b/Services/Ims/V2/Model/BatchAddOrDeleteTagsRequestBody.php new file mode 100755 index 0000000..1cbbd7e --- /dev/null +++ b/Services/Ims/V2/Model/BatchAddOrDeleteTagsRequestBody.php @@ -0,0 +1,329 @@ + 'string', + 'tags' => '\G42Cloud\SDK\Ims\V2\Model\ResourceTag[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * action 要进行的标签操作,区分大小写。支持create、delete,分别用于批量地创建/更新、删除标签。 + * tags 需要增加、修改或者删除的标签键值对集合。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'action' => null, + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * action 要进行的标签操作,区分大小写。支持create、delete,分别用于批量地创建/更新、删除标签。 + * tags 需要增加、修改或者删除的标签键值对集合。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'action' => 'action', + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * action 要进行的标签操作,区分大小写。支持create、delete,分别用于批量地创建/更新、删除标签。 + * tags 需要增加、修改或者删除的标签键值对集合。 + * + * @var string[] + */ + protected static $setters = [ + 'action' => 'setAction', + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * action 要进行的标签操作,区分大小写。支持create、delete,分别用于批量地创建/更新、删除标签。 + * tags 需要增加、修改或者删除的标签键值对集合。 + * + * @var string[] + */ + protected static $getters = [ + 'action' => 'getAction', + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const ACTION_CREATE = 'create'; + const ACTION_DELETE = 'delete'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActionAllowableValues() + { + return [ + self::ACTION_CREATE, + self::ACTION_DELETE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['action'] === null) { + $invalidProperties[] = "'action' can't be null"; + } + $allowedValues = $this->getActionAllowableValues(); + if (!is_null($this->container['action']) && !in_array($this->container['action'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'action', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets action + * 要进行的标签操作,区分大小写。支持create、delete,分别用于批量地创建/更新、删除标签。 + * + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string $action 要进行的标签操作,区分大小写。支持create、delete,分别用于批量地创建/更新、删除标签。 + * + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + return $this; + } + + /** + * Gets tags + * 需要增加、修改或者删除的标签键值对集合。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\ResourceTag[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Ims\V2\Model\ResourceTag[] $tags 需要增加、修改或者删除的标签键值对集合。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchAddOrDeleteTagsResponse.php b/Services/Ims/V2/Model/BatchAddOrDeleteTagsResponse.php new file mode 100755 index 0000000..f997a40 --- /dev/null +++ b/Services/Ims/V2/Model/BatchAddOrDeleteTagsResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchDeleteMembersRequest.php b/Services/Ims/V2/Model/BatchDeleteMembersRequest.php new file mode 100755 index 0000000..496ba14 --- /dev/null +++ b/Services/Ims/V2/Model/BatchDeleteMembersRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\BatchAddMembersRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchDeleteMembersResponse.php b/Services/Ims/V2/Model/BatchDeleteMembersResponse.php new file mode 100755 index 0000000..8c740c2 --- /dev/null +++ b/Services/Ims/V2/Model/BatchDeleteMembersResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchUpdateMembersRequest.php b/Services/Ims/V2/Model/BatchUpdateMembersRequest.php new file mode 100755 index 0000000..0da96e6 --- /dev/null +++ b/Services/Ims/V2/Model/BatchUpdateMembersRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\BatchUpdateMembersRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\BatchUpdateMembersRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\BatchUpdateMembersRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchUpdateMembersRequestBody.php b/Services/Ims/V2/Model/BatchUpdateMembersRequestBody.php new file mode 100755 index 0000000..b987207 --- /dev/null +++ b/Services/Ims/V2/Model/BatchUpdateMembersRequestBody.php @@ -0,0 +1,402 @@ + 'string[]', + 'projectId' => 'string', + 'status' => 'string', + 'vaultId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * images 镜像ID列表。 + * projectId 项目ID。 + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是通过CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'images' => null, + 'projectId' => null, + 'status' => null, + 'vaultId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * images 镜像ID列表。 + * projectId 项目ID。 + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是通过CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'images' => 'images', + 'projectId' => 'project_id', + 'status' => 'status', + 'vaultId' => 'vault_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * images 镜像ID列表。 + * projectId 项目ID。 + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是通过CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 + * + * @var string[] + */ + protected static $setters = [ + 'images' => 'setImages', + 'projectId' => 'setProjectId', + 'status' => 'setStatus', + 'vaultId' => 'setVaultId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * images 镜像ID列表。 + * projectId 项目ID。 + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是通过CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 + * + * @var string[] + */ + protected static $getters = [ + 'images' => 'getImages', + 'projectId' => 'getProjectId', + 'status' => 'getStatus', + 'vaultId' => 'getVaultId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const STATUS_ACCEPTED = 'accepted'; + const STATUS_REJECTED = 'rejected'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACCEPTED, + self::STATUS_REJECTED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['images'] = isset($data['images']) ? $data['images'] : null; + $this->container['projectId'] = isset($data['projectId']) ? $data['projectId'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['vaultId'] = isset($data['vaultId']) ? $data['vaultId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['images'] === null) { + $invalidProperties[] = "'images' can't be null"; + } + if ($this->container['projectId'] === null) { + $invalidProperties[] = "'projectId' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets images + * 镜像ID列表。 + * + * @return string[] + */ + public function getImages() + { + return $this->container['images']; + } + + /** + * Sets images + * + * @param string[] $images 镜像ID列表。 + * + * @return $this + */ + public function setImages($images) + { + $this->container['images'] = $images; + return $this; + } + + /** + * Gets projectId + * 项目ID。 + * + * @return string + */ + public function getProjectId() + { + return $this->container['projectId']; + } + + /** + * Sets projectId + * + * @param string $projectId 项目ID。 + * + * @return $this + */ + public function setProjectId($projectId) + { + $this->container['projectId'] = $projectId; + return $this; + } + + /** + * Gets status + * 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets vaultId + * 存储库ID。 如果是通过CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 + * + * @return string|null + */ + public function getVaultId() + { + return $this->container['vaultId']; + } + + /** + * Sets vaultId + * + * @param string|null $vaultId 存储库ID。 如果是通过CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 + * + * @return $this + */ + public function setVaultId($vaultId) + { + $this->container['vaultId'] = $vaultId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/BatchUpdateMembersResponse.php b/Services/Ims/V2/Model/BatchUpdateMembersResponse.php new file mode 100755 index 0000000..ace8084 --- /dev/null +++ b/Services/Ims/V2/Model/BatchUpdateMembersResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CopyImageCrossRegionRequest.php b/Services/Ims/V2/Model/CopyImageCrossRegionRequest.php new file mode 100755 index 0000000..1da229c --- /dev/null +++ b/Services/Ims/V2/Model/CopyImageCrossRegionRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\CopyImageCrossRegionRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\CopyImageCrossRegionRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\CopyImageCrossRegionRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CopyImageCrossRegionRequestBody.php b/Services/Ims/V2/Model/CopyImageCrossRegionRequestBody.php new file mode 100755 index 0000000..73a16f1 --- /dev/null +++ b/Services/Ims/V2/Model/CopyImageCrossRegionRequestBody.php @@ -0,0 +1,423 @@ +,长度不能超过1024个字符。默认为空。 + * name 镜像名称 + * projectName 目的区域的项目名称。 + * region 目的区域的Region ID。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'agencyName' => 'string', + 'description' => 'string', + 'name' => 'string', + 'projectName' => 'string', + 'region' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * agencyName IMS服务委托名称。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * name 镜像名称 + * projectName 目的区域的项目名称。 + * region 目的区域的Region ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'agencyName' => null, + 'description' => null, + 'name' => null, + 'projectName' => null, + 'region' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * agencyName IMS服务委托名称。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * name 镜像名称 + * projectName 目的区域的项目名称。 + * region 目的区域的Region ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'agencyName' => 'agency_name', + 'description' => 'description', + 'name' => 'name', + 'projectName' => 'project_name', + 'region' => 'region' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * agencyName IMS服务委托名称。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * name 镜像名称 + * projectName 目的区域的项目名称。 + * region 目的区域的Region ID。 + * + * @var string[] + */ + protected static $setters = [ + 'agencyName' => 'setAgencyName', + 'description' => 'setDescription', + 'name' => 'setName', + 'projectName' => 'setProjectName', + 'region' => 'setRegion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * agencyName IMS服务委托名称。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * name 镜像名称 + * projectName 目的区域的项目名称。 + * region 目的区域的Region ID。 + * + * @var string[] + */ + protected static $getters = [ + 'agencyName' => 'getAgencyName', + 'description' => 'getDescription', + 'name' => 'getName', + 'projectName' => 'getProjectName', + 'region' => 'getRegion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['agencyName'] = isset($data['agencyName']) ? $data['agencyName'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['projectName'] = isset($data['projectName']) ? $data['projectName'] : null; + $this->container['region'] = isset($data['region']) ? $data['region'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['agencyName'] === null) { + $invalidProperties[] = "'agencyName' can't be null"; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['projectName'] === null) { + $invalidProperties[] = "'projectName' can't be null"; + } + if ($this->container['region'] === null) { + $invalidProperties[] = "'region' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets agencyName + * IMS服务委托名称。 + * + * @return string + */ + public function getAgencyName() + { + return $this->container['agencyName']; + } + + /** + * Sets agencyName + * + * @param string $agencyName IMS服务委托名称。 + * + * @return $this + */ + public function setAgencyName($agencyName) + { + $this->container['agencyName'] = $agencyName; + return $this; + } + + /** + * Gets description + * 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets name + * 镜像名称 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets projectName + * 目的区域的项目名称。 + * + * @return string + */ + public function getProjectName() + { + return $this->container['projectName']; + } + + /** + * Sets projectName + * + * @param string $projectName 目的区域的项目名称。 + * + * @return $this + */ + public function setProjectName($projectName) + { + $this->container['projectName'] = $projectName; + return $this; + } + + /** + * Gets region + * 目的区域的Region ID。 + * + * @return string + */ + public function getRegion() + { + return $this->container['region']; + } + + /** + * Sets region + * + * @param string $region 目的区域的Region ID。 + * + * @return $this + */ + public function setRegion($region) + { + $this->container['region'] = $region; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CopyImageCrossRegionResponse.php b/Services/Ims/V2/Model/CopyImageCrossRegionResponse.php new file mode 100755 index 0000000..d2cb28e --- /dev/null +++ b/Services/Ims/V2/Model/CopyImageCrossRegionResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CopyImageInRegionRequest.php b/Services/Ims/V2/Model/CopyImageInRegionRequest.php new file mode 100755 index 0000000..5d450c5 --- /dev/null +++ b/Services/Ims/V2/Model/CopyImageInRegionRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\CopyImageInRegionRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\CopyImageInRegionRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\CopyImageInRegionRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CopyImageInRegionRequestBody.php b/Services/Ims/V2/Model/CopyImageInRegionRequestBody.php new file mode 100755 index 0000000..6fb349c --- /dev/null +++ b/Services/Ims/V2/Model/CopyImageInRegionRequestBody.php @@ -0,0 +1,379 @@ +,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * name 镜像名称 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cmkId' => 'string', + 'description' => 'string', + 'enterpriseProjectId' => 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * cmkId 加密密钥。默认为空。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * name 镜像名称 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'cmkId' => null, + 'description' => null, + 'enterpriseProjectId' => null, + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * cmkId 加密密钥。默认为空。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * name 镜像名称 + * + * @var string[] + */ + protected static $attributeMap = [ + 'cmkId' => 'cmk_id', + 'description' => 'description', + 'enterpriseProjectId' => 'enterprise_project_id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * cmkId 加密密钥。默认为空。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * name 镜像名称 + * + * @var string[] + */ + protected static $setters = [ + 'cmkId' => 'setCmkId', + 'description' => 'setDescription', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * cmkId 加密密钥。默认为空。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * name 镜像名称 + * + * @var string[] + */ + protected static $getters = [ + 'cmkId' => 'getCmkId', + 'description' => 'getDescription', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cmkId'] = isset($data['cmkId']) ? $data['cmkId'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : '0'; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets cmkId + * 加密密钥。默认为空。 + * + * @return string|null + */ + public function getCmkId() + { + return $this->container['cmkId']; + } + + /** + * Sets cmkId + * + * @param string|null $cmkId 加密密钥。默认为空。 + * + * @return $this + */ + public function setCmkId($cmkId) + { + $this->container['cmkId'] = $cmkId; + return $this; + } + + /** + * Gets description + * 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets name + * 镜像名称 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CopyImageInRegionResponse.php b/Services/Ims/V2/Model/CopyImageInRegionResponse.php new file mode 100755 index 0000000..2aa3aff --- /dev/null +++ b/Services/Ims/V2/Model/CopyImageInRegionResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateDataImage.php b/Services/Ims/V2/Model/CreateDataImage.php new file mode 100755 index 0000000..00b5d1a --- /dev/null +++ b/Services/Ims/V2/Model/CreateDataImage.php @@ -0,0 +1,376 @@ + 'string', + 'volumeId' => 'string', + 'description' => 'string', + 'tags' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * name 数据盘镜像名称。 + * volumeId 数据盘ID。 + * description 数据盘描述。 + * tags 数据盘镜像标签。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'volumeId' => null, + 'description' => null, + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * name 数据盘镜像名称。 + * volumeId 数据盘ID。 + * description 数据盘描述。 + * tags 数据盘镜像标签。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'volumeId' => 'volume_id', + 'description' => 'description', + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * name 数据盘镜像名称。 + * volumeId 数据盘ID。 + * description 数据盘描述。 + * tags 数据盘镜像标签。 + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'volumeId' => 'setVolumeId', + 'description' => 'setDescription', + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * name 数据盘镜像名称。 + * volumeId 数据盘ID。 + * description 数据盘描述。 + * tags 数据盘镜像标签。 + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'volumeId' => 'getVolumeId', + 'description' => 'getDescription', + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['volumeId'] = isset($data['volumeId']) ? $data['volumeId'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['volumeId'] === null) { + $invalidProperties[] = "'volumeId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * 数据盘镜像名称。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 数据盘镜像名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets volumeId + * 数据盘ID。 + * + * @return string + */ + public function getVolumeId() + { + return $this->container['volumeId']; + } + + /** + * Sets volumeId + * + * @param string $volumeId 数据盘ID。 + * + * @return $this + */ + public function setVolumeId($volumeId) + { + $this->container['volumeId'] = $volumeId; + return $this; + } + + /** + * Gets description + * 数据盘描述。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 数据盘描述。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets tags + * 数据盘镜像标签。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 数据盘镜像标签。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateDataImageRequest.php b/Services/Ims/V2/Model/CreateDataImageRequest.php new file mode 100755 index 0000000..e03d832 --- /dev/null +++ b/Services/Ims/V2/Model/CreateDataImageRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\CreateDataImageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\CreateDataImageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\CreateDataImageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateDataImageRequestBody.php b/Services/Ims/V2/Model/CreateDataImageRequestBody.php new file mode 100755 index 0000000..fed333d --- /dev/null +++ b/Services/Ims/V2/Model/CreateDataImageRequestBody.php @@ -0,0 +1,589 @@ +,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目;取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * imageUrl OBS桶中外部镜像文件地址。格式为:。 此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小数据盘大小。取值范围40-2048GB。 + * name 镜像名称。 + * osType 操作系统类型。只能是Windows、Linux二者之一,默认Linux。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cmkId' => 'string', + 'description' => 'string', + 'enterpriseProjectId' => 'string', + 'imageTags' => '\G42Cloud\SDK\Ims\V2\Model\ImageTag[]', + 'imageUrl' => 'string', + 'minDisk' => 'int', + 'name' => 'string', + 'osType' => 'string', + 'tags' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目;取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * imageUrl OBS桶中外部镜像文件地址。格式为:。 此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小数据盘大小。取值范围40-2048GB。 + * name 镜像名称。 + * osType 操作系统类型。只能是Windows、Linux二者之一,默认Linux。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'cmkId' => null, + 'description' => null, + 'enterpriseProjectId' => null, + 'imageTags' => null, + 'imageUrl' => null, + 'minDisk' => 'int32', + 'name' => null, + 'osType' => null, + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目;取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * imageUrl OBS桶中外部镜像文件地址。格式为:。 此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小数据盘大小。取值范围40-2048GB。 + * name 镜像名称。 + * osType 操作系统类型。只能是Windows、Linux二者之一,默认Linux。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'cmkId' => 'cmk_id', + 'description' => 'description', + 'enterpriseProjectId' => 'enterprise_project_id', + 'imageTags' => 'image_tags', + 'imageUrl' => 'image_url', + 'minDisk' => 'min_disk', + 'name' => 'name', + 'osType' => 'os_type', + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目;取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * imageUrl OBS桶中外部镜像文件地址。格式为:。 此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小数据盘大小。取值范围40-2048GB。 + * name 镜像名称。 + * osType 操作系统类型。只能是Windows、Linux二者之一,默认Linux。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $setters = [ + 'cmkId' => 'setCmkId', + 'description' => 'setDescription', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'imageTags' => 'setImageTags', + 'imageUrl' => 'setImageUrl', + 'minDisk' => 'setMinDisk', + 'name' => 'setName', + 'osType' => 'setOsType', + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目;取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * imageUrl OBS桶中外部镜像文件地址。格式为:。 此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小数据盘大小。取值范围40-2048GB。 + * name 镜像名称。 + * osType 操作系统类型。只能是Windows、Linux二者之一,默认Linux。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $getters = [ + 'cmkId' => 'getCmkId', + 'description' => 'getDescription', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'imageTags' => 'getImageTags', + 'imageUrl' => 'getImageUrl', + 'minDisk' => 'getMinDisk', + 'name' => 'getName', + 'osType' => 'getOsType', + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_LINUX = 'Linux'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_WINDOWS, + self::OS_TYPE_LINUX, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cmkId'] = isset($data['cmkId']) ? $data['cmkId'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : '0'; + $this->container['imageTags'] = isset($data['imageTags']) ? $data['imageTags'] : null; + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + if ($this->container['imageUrl'] === null) { + $invalidProperties[] = "'imageUrl' can't be null"; + } + if ($this->container['minDisk'] === null) { + $invalidProperties[] = "'minDisk' can't be null"; + } + if (($this->container['minDisk'] > 2048)) { + $invalidProperties[] = "invalid value for 'minDisk', must be smaller than or equal to 2048."; + } + if (($this->container['minDisk'] < 40)) { + $invalidProperties[] = "invalid value for 'minDisk', must be bigger than or equal to 40."; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets cmkId + * 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * + * @return string|null + */ + public function getCmkId() + { + return $this->container['cmkId']; + } + + /** + * Sets cmkId + * + * @param string|null $cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * + * @return $this + */ + public function setCmkId($cmkId) + { + $this->container['cmkId'] = $cmkId; + return $this; + } + + /** + * Gets description + * 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目;取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目;取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets imageTags + * 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\ImageTag[]|null + */ + public function getImageTags() + { + return $this->container['imageTags']; + } + + /** + * Sets imageTags + * + * @param \G42Cloud\SDK\Ims\V2\Model\ImageTag[]|null $imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setImageTags($imageTags) + { + $this->container['imageTags'] = $imageTags; + return $this; + } + + /** + * Gets imageUrl + * OBS桶中外部镜像文件地址。格式为:。 此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * + * @return string + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string $imageUrl OBS桶中外部镜像文件地址。格式为:。 此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + return $this; + } + + /** + * Gets minDisk + * 最小数据盘大小。取值范围40-2048GB。 + * + * @return int + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int $minDisk 最小数据盘大小。取值范围40-2048GB。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets name + * 镜像名称。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets osType + * 操作系统类型。只能是Windows、Linux二者之一,默认Linux。 + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 操作系统类型。只能是Windows、Linux二者之一,默认Linux。 + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets tags + * 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateDataImageResponse.php b/Services/Ims/V2/Model/CreateDataImageResponse.php new file mode 100755 index 0000000..455db7d --- /dev/null +++ b/Services/Ims/V2/Model/CreateDataImageResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateImageRequest.php b/Services/Ims/V2/Model/CreateImageRequest.php new file mode 100755 index 0000000..638b47d --- /dev/null +++ b/Services/Ims/V2/Model/CreateImageRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\CreateImageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\CreateImageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\CreateImageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateImageRequestBody.php b/Services/Ims/V2/Model/CreateImageRequestBody.php new file mode 100755 index 0000000..c75576a --- /dev/null +++ b/Services/Ims/V2/Model/CreateImageRequestBody.php @@ -0,0 +1,919 @@ +,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 需要转换的云服务器ID。使用instance_id字段,从云服务器制作私有镜像时,该字段填写云服务器ID。 + * name 镜像名称 + * tags 镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * maxRam 表示镜像支持的最大内存,单位为MB。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0,表示不受限制。 + * osVersion 操作系统版本。 使用上传至OBS桶中的外部镜像文件制作镜像时生效。 当“is_quick_import”的值为“true”时,即使用镜像文件快速导入方式导入系统盘镜像,则该参数为必填参数。 + * imageUrl OBS桶中外部镜像文件地址。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。 + * minDisk 最小系统盘大小。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为40~1024GB。 + * isConfig 是否自动配置。 取值为true或false。 如果需要后台自动配置,取值为true,否则为false。默认取值为false。 + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * type 镜像的类型。 取值为ECS、BMS、FusionCompute、Ironic。默认使用“ECS”。 ECS/FusionCompute:表示是ECS服务器的镜像。 BMS/Ironic:表示是BMS服务器的镜像。 + * isQuickImport 是否使用镜像文件快速导入方式,导入系统盘镜像。 是,配置为true。 否,配置为false。 关于镜像文件快速导入的约束与限制请参见镜像文件快速导入。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 当架构类型为arm时,镜像引导方式将自动转为UEFI的引导方式。 + * volumeId 数据盘的卷ID。当数据盘创建系统盘镜像时,该参数必选 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'dataImages' => '\G42Cloud\SDK\Ims\V2\Model\CreateDataImage[]', + 'description' => 'string', + 'enterpriseProjectId' => 'string', + 'imageTags' => '\G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]', + 'instanceId' => 'string', + 'name' => 'string', + 'tags' => 'string[]', + 'maxRam' => 'int', + 'minRam' => 'int', + 'osVersion' => 'string', + 'imageUrl' => 'string', + 'minDisk' => 'int', + 'isConfig' => 'bool', + 'cmkId' => 'string', + 'type' => 'string', + 'isQuickImport' => 'bool', + 'architecture' => 'string', + 'volumeId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * dataImages 需要转换的数据盘信息,其中,当使用云服务器上的数据盘进行私有数据盘镜像创建时,该字段必选。 如果不是用于制作数据盘镜像,该字段默认为空。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 需要转换的云服务器ID。使用instance_id字段,从云服务器制作私有镜像时,该字段填写云服务器ID。 + * name 镜像名称 + * tags 镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * maxRam 表示镜像支持的最大内存,单位为MB。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0,表示不受限制。 + * osVersion 操作系统版本。 使用上传至OBS桶中的外部镜像文件制作镜像时生效。 当“is_quick_import”的值为“true”时,即使用镜像文件快速导入方式导入系统盘镜像,则该参数为必填参数。 + * imageUrl OBS桶中外部镜像文件地址。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。 + * minDisk 最小系统盘大小。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为40~1024GB。 + * isConfig 是否自动配置。 取值为true或false。 如果需要后台自动配置,取值为true,否则为false。默认取值为false。 + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * type 镜像的类型。 取值为ECS、BMS、FusionCompute、Ironic。默认使用“ECS”。 ECS/FusionCompute:表示是ECS服务器的镜像。 BMS/Ironic:表示是BMS服务器的镜像。 + * isQuickImport 是否使用镜像文件快速导入方式,导入系统盘镜像。 是,配置为true。 否,配置为false。 关于镜像文件快速导入的约束与限制请参见镜像文件快速导入。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 当架构类型为arm时,镜像引导方式将自动转为UEFI的引导方式。 + * volumeId 数据盘的卷ID。当数据盘创建系统盘镜像时,该参数必选 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'dataImages' => null, + 'description' => null, + 'enterpriseProjectId' => null, + 'imageTags' => null, + 'instanceId' => null, + 'name' => null, + 'tags' => null, + 'maxRam' => 'int32', + 'minRam' => 'int32', + 'osVersion' => null, + 'imageUrl' => null, + 'minDisk' => null, + 'isConfig' => null, + 'cmkId' => null, + 'type' => null, + 'isQuickImport' => null, + 'architecture' => null, + 'volumeId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * dataImages 需要转换的数据盘信息,其中,当使用云服务器上的数据盘进行私有数据盘镜像创建时,该字段必选。 如果不是用于制作数据盘镜像,该字段默认为空。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 需要转换的云服务器ID。使用instance_id字段,从云服务器制作私有镜像时,该字段填写云服务器ID。 + * name 镜像名称 + * tags 镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * maxRam 表示镜像支持的最大内存,单位为MB。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0,表示不受限制。 + * osVersion 操作系统版本。 使用上传至OBS桶中的外部镜像文件制作镜像时生效。 当“is_quick_import”的值为“true”时,即使用镜像文件快速导入方式导入系统盘镜像,则该参数为必填参数。 + * imageUrl OBS桶中外部镜像文件地址。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。 + * minDisk 最小系统盘大小。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为40~1024GB。 + * isConfig 是否自动配置。 取值为true或false。 如果需要后台自动配置,取值为true,否则为false。默认取值为false。 + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * type 镜像的类型。 取值为ECS、BMS、FusionCompute、Ironic。默认使用“ECS”。 ECS/FusionCompute:表示是ECS服务器的镜像。 BMS/Ironic:表示是BMS服务器的镜像。 + * isQuickImport 是否使用镜像文件快速导入方式,导入系统盘镜像。 是,配置为true。 否,配置为false。 关于镜像文件快速导入的约束与限制请参见镜像文件快速导入。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 当架构类型为arm时,镜像引导方式将自动转为UEFI的引导方式。 + * volumeId 数据盘的卷ID。当数据盘创建系统盘镜像时,该参数必选 + * + * @var string[] + */ + protected static $attributeMap = [ + 'dataImages' => 'data_images', + 'description' => 'description', + 'enterpriseProjectId' => 'enterprise_project_id', + 'imageTags' => 'image_tags', + 'instanceId' => 'instance_id', + 'name' => 'name', + 'tags' => 'tags', + 'maxRam' => 'max_ram', + 'minRam' => 'min_ram', + 'osVersion' => 'os_version', + 'imageUrl' => 'image_url', + 'minDisk' => 'min_disk', + 'isConfig' => 'is_config', + 'cmkId' => 'cmk_id', + 'type' => 'type', + 'isQuickImport' => 'is_quick_import', + 'architecture' => 'architecture', + 'volumeId' => 'volume_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * dataImages 需要转换的数据盘信息,其中,当使用云服务器上的数据盘进行私有数据盘镜像创建时,该字段必选。 如果不是用于制作数据盘镜像,该字段默认为空。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 需要转换的云服务器ID。使用instance_id字段,从云服务器制作私有镜像时,该字段填写云服务器ID。 + * name 镜像名称 + * tags 镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * maxRam 表示镜像支持的最大内存,单位为MB。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0,表示不受限制。 + * osVersion 操作系统版本。 使用上传至OBS桶中的外部镜像文件制作镜像时生效。 当“is_quick_import”的值为“true”时,即使用镜像文件快速导入方式导入系统盘镜像,则该参数为必填参数。 + * imageUrl OBS桶中外部镜像文件地址。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。 + * minDisk 最小系统盘大小。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为40~1024GB。 + * isConfig 是否自动配置。 取值为true或false。 如果需要后台自动配置,取值为true,否则为false。默认取值为false。 + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * type 镜像的类型。 取值为ECS、BMS、FusionCompute、Ironic。默认使用“ECS”。 ECS/FusionCompute:表示是ECS服务器的镜像。 BMS/Ironic:表示是BMS服务器的镜像。 + * isQuickImport 是否使用镜像文件快速导入方式,导入系统盘镜像。 是,配置为true。 否,配置为false。 关于镜像文件快速导入的约束与限制请参见镜像文件快速导入。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 当架构类型为arm时,镜像引导方式将自动转为UEFI的引导方式。 + * volumeId 数据盘的卷ID。当数据盘创建系统盘镜像时,该参数必选 + * + * @var string[] + */ + protected static $setters = [ + 'dataImages' => 'setDataImages', + 'description' => 'setDescription', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'imageTags' => 'setImageTags', + 'instanceId' => 'setInstanceId', + 'name' => 'setName', + 'tags' => 'setTags', + 'maxRam' => 'setMaxRam', + 'minRam' => 'setMinRam', + 'osVersion' => 'setOsVersion', + 'imageUrl' => 'setImageUrl', + 'minDisk' => 'setMinDisk', + 'isConfig' => 'setIsConfig', + 'cmkId' => 'setCmkId', + 'type' => 'setType', + 'isQuickImport' => 'setIsQuickImport', + 'architecture' => 'setArchitecture', + 'volumeId' => 'setVolumeId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * dataImages 需要转换的数据盘信息,其中,当使用云服务器上的数据盘进行私有数据盘镜像创建时,该字段必选。 如果不是用于制作数据盘镜像,该字段默认为空。 + * description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 需要转换的云服务器ID。使用instance_id字段,从云服务器制作私有镜像时,该字段填写云服务器ID。 + * name 镜像名称 + * tags 镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * maxRam 表示镜像支持的最大内存,单位为MB。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0,表示不受限制。 + * osVersion 操作系统版本。 使用上传至OBS桶中的外部镜像文件制作镜像时生效。 当“is_quick_import”的值为“true”时,即使用镜像文件快速导入方式导入系统盘镜像,则该参数为必填参数。 + * imageUrl OBS桶中外部镜像文件地址。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。 + * minDisk 最小系统盘大小。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为40~1024GB。 + * isConfig 是否自动配置。 取值为true或false。 如果需要后台自动配置,取值为true,否则为false。默认取值为false。 + * cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * type 镜像的类型。 取值为ECS、BMS、FusionCompute、Ironic。默认使用“ECS”。 ECS/FusionCompute:表示是ECS服务器的镜像。 BMS/Ironic:表示是BMS服务器的镜像。 + * isQuickImport 是否使用镜像文件快速导入方式,导入系统盘镜像。 是,配置为true。 否,配置为false。 关于镜像文件快速导入的约束与限制请参见镜像文件快速导入。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 当架构类型为arm时,镜像引导方式将自动转为UEFI的引导方式。 + * volumeId 数据盘的卷ID。当数据盘创建系统盘镜像时,该参数必选 + * + * @var string[] + */ + protected static $getters = [ + 'dataImages' => 'getDataImages', + 'description' => 'getDescription', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'imageTags' => 'getImageTags', + 'instanceId' => 'getInstanceId', + 'name' => 'getName', + 'tags' => 'getTags', + 'maxRam' => 'getMaxRam', + 'minRam' => 'getMinRam', + 'osVersion' => 'getOsVersion', + 'imageUrl' => 'getImageUrl', + 'minDisk' => 'getMinDisk', + 'isConfig' => 'getIsConfig', + 'cmkId' => 'getCmkId', + 'type' => 'getType', + 'isQuickImport' => 'getIsQuickImport', + 'architecture' => 'getArchitecture', + 'volumeId' => 'getVolumeId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const TYPE_ECS = 'ECS'; + const TYPE_BMS = 'BMS'; + const TYPE_FUSION_COMPUTE = 'FusionCompute'; + const TYPE_IRONIC = 'Ironic'; + const ARCHITECTURE_X86 = 'x86'; + const ARCHITECTURE_ARM = 'arm'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_ECS, + self::TYPE_BMS, + self::TYPE_FUSION_COMPUTE, + self::TYPE_IRONIC, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArchitectureAllowableValues() + { + return [ + self::ARCHITECTURE_X86, + self::ARCHITECTURE_ARM, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['dataImages'] = isset($data['dataImages']) ? $data['dataImages'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['imageTags'] = isset($data['imageTags']) ? $data['imageTags'] : null; + $this->container['instanceId'] = isset($data['instanceId']) ? $data['instanceId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['maxRam'] = isset($data['maxRam']) ? $data['maxRam'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['isConfig'] = isset($data['isConfig']) ? $data['isConfig'] : false; + $this->container['cmkId'] = isset($data['cmkId']) ? $data['cmkId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'ECS'; + $this->container['isQuickImport'] = isset($data['isQuickImport']) ? $data['isQuickImport'] : false; + $this->container['architecture'] = isset($data['architecture']) ? $data['architecture'] : 'x86'; + $this->container['volumeId'] = isset($data['volumeId']) ? $data['volumeId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getArchitectureAllowableValues(); + if (!is_null($this->container['architecture']) && !in_array($this->container['architecture'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'architecture', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets dataImages + * 需要转换的数据盘信息,其中,当使用云服务器上的数据盘进行私有数据盘镜像创建时,该字段必选。 如果不是用于制作数据盘镜像,该字段默认为空。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\CreateDataImage[]|null + */ + public function getDataImages() + { + return $this->container['dataImages']; + } + + /** + * Sets dataImages + * + * @param \G42Cloud\SDK\Ims\V2\Model\CreateDataImage[]|null $dataImages 需要转换的数据盘信息,其中,当使用云服务器上的数据盘进行私有数据盘镜像创建时,该字段必选。 如果不是用于制作数据盘镜像,该字段默认为空。 + * + * @return $this + */ + public function setDataImages($dataImages) + { + $this->container['dataImages'] = $dataImages; + return $this; + } + + /** + * Gets description + * 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets imageTags + * 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]|null + */ + public function getImageTags() + { + return $this->container['imageTags']; + } + + /** + * Sets imageTags + * + * @param \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]|null $imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setImageTags($imageTags) + { + $this->container['imageTags'] = $imageTags; + return $this; + } + + /** + * Gets instanceId + * 需要转换的云服务器ID。使用instance_id字段,从云服务器制作私有镜像时,该字段填写云服务器ID。 + * + * @return string|null + */ + public function getInstanceId() + { + return $this->container['instanceId']; + } + + /** + * Sets instanceId + * + * @param string|null $instanceId 需要转换的云服务器ID。使用instance_id字段,从云服务器制作私有镜像时,该字段填写云服务器ID。 + * + * @return $this + */ + public function setInstanceId($instanceId) + { + $this->container['instanceId'] = $instanceId; + return $this; + } + + /** + * Gets name + * 镜像名称 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets tags + * 镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets maxRam + * 表示镜像支持的最大内存,单位为MB。 + * + * @return int|null + */ + public function getMaxRam() + { + return $this->container['maxRam']; + } + + /** + * Sets maxRam + * + * @param int|null $maxRam 表示镜像支持的最大内存,单位为MB。 + * + * @return $this + */ + public function setMaxRam($maxRam) + { + $this->container['maxRam'] = $maxRam; + return $this; + } + + /** + * Gets minRam + * 表示镜像支持的最小内存,单位为MB,默认为0,表示不受限制。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 表示镜像支持的最小内存,单位为MB,默认为0,表示不受限制。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets osVersion + * 操作系统版本。 使用上传至OBS桶中的外部镜像文件制作镜像时生效。 当“is_quick_import”的值为“true”时,即使用镜像文件快速导入方式导入系统盘镜像,则该参数为必填参数。 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 操作系统版本。 使用上传至OBS桶中的外部镜像文件制作镜像时生效。 当“is_quick_import”的值为“true”时,即使用镜像文件快速导入方式导入系统盘镜像,则该参数为必填参数。 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets imageUrl + * OBS桶中外部镜像文件地址。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。 + * + * @return string|null + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string|null $imageUrl OBS桶中外部镜像文件地址。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。 + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + return $this; + } + + /** + * Gets minDisk + * 最小系统盘大小。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为40~1024GB。 + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 最小系统盘大小。 在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为40~1024GB。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets isConfig + * 是否自动配置。 取值为true或false。 如果需要后台自动配置,取值为true,否则为false。默认取值为false。 + * + * @return bool|null + */ + public function getIsConfig() + { + return $this->container['isConfig']; + } + + /** + * Sets isConfig + * + * @param bool|null $isConfig 是否自动配置。 取值为true或false。 如果需要后台自动配置,取值为true,否则为false。默认取值为false。 + * + * @return $this + */ + public function setIsConfig($isConfig) + { + $this->container['isConfig'] = $isConfig; + return $this; + } + + /** + * Gets cmkId + * 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * + * @return string|null + */ + public function getCmkId() + { + return $this->container['cmkId']; + } + + /** + * Sets cmkId + * + * @param string|null $cmkId 创建加密镜像的用户主密钥,具体取值请参考《密钥管理服务用户指南》获取。 + * + * @return $this + */ + public function setCmkId($cmkId) + { + $this->container['cmkId'] = $cmkId; + return $this; + } + + /** + * Gets type + * 镜像的类型。 取值为ECS、BMS、FusionCompute、Ironic。默认使用“ECS”。 ECS/FusionCompute:表示是ECS服务器的镜像。 BMS/Ironic:表示是BMS服务器的镜像。 + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type 镜像的类型。 取值为ECS、BMS、FusionCompute、Ironic。默认使用“ECS”。 ECS/FusionCompute:表示是ECS服务器的镜像。 BMS/Ironic:表示是BMS服务器的镜像。 + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + return $this; + } + + /** + * Gets isQuickImport + * 是否使用镜像文件快速导入方式,导入系统盘镜像。 是,配置为true。 否,配置为false。 关于镜像文件快速导入的约束与限制请参见镜像文件快速导入。 + * + * @return bool|null + */ + public function getIsQuickImport() + { + return $this->container['isQuickImport']; + } + + /** + * Sets isQuickImport + * + * @param bool|null $isQuickImport 是否使用镜像文件快速导入方式,导入系统盘镜像。 是,配置为true。 否,配置为false。 关于镜像文件快速导入的约束与限制请参见镜像文件快速导入。 + * + * @return $this + */ + public function setIsQuickImport($isQuickImport) + { + $this->container['isQuickImport'] = $isQuickImport; + return $this; + } + + /** + * Gets architecture + * 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 当架构类型为arm时,镜像引导方式将自动转为UEFI的引导方式。 + * + * @return string|null + */ + public function getArchitecture() + { + return $this->container['architecture']; + } + + /** + * Sets architecture + * + * @param string|null $architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 当架构类型为arm时,镜像引导方式将自动转为UEFI的引导方式。 + * + * @return $this + */ + public function setArchitecture($architecture) + { + $this->container['architecture'] = $architecture; + return $this; + } + + /** + * Gets volumeId + * 数据盘的卷ID。当数据盘创建系统盘镜像时,该参数必选 + * + * @return string|null + */ + public function getVolumeId() + { + return $this->container['volumeId']; + } + + /** + * Sets volumeId + * + * @param string|null $volumeId 数据盘的卷ID。当数据盘创建系统盘镜像时,该参数必选 + * + * @return $this + */ + public function setVolumeId($volumeId) + { + $this->container['volumeId'] = $volumeId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateImageResponse.php b/Services/Ims/V2/Model/CreateImageResponse.php new file mode 100755 index 0000000..3073690 --- /dev/null +++ b/Services/Ims/V2/Model/CreateImageResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateOrUpdateTagsRequest.php b/Services/Ims/V2/Model/CreateOrUpdateTagsRequest.php new file mode 100755 index 0000000..7858fa1 --- /dev/null +++ b/Services/Ims/V2/Model/CreateOrUpdateTagsRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\AddOrUpdateTagsRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\AddOrUpdateTagsRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\AddOrUpdateTagsRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateOrUpdateTagsResponse.php b/Services/Ims/V2/Model/CreateOrUpdateTagsResponse.php new file mode 100755 index 0000000..f44697e --- /dev/null +++ b/Services/Ims/V2/Model/CreateOrUpdateTagsResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateWholeImageRequest.php b/Services/Ims/V2/Model/CreateWholeImageRequest.php new file mode 100755 index 0000000..b813580 --- /dev/null +++ b/Services/Ims/V2/Model/CreateWholeImageRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\CreateWholeImageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\CreateWholeImageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\CreateWholeImageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateWholeImageRequestBody.php b/Services/Ims/V2/Model/CreateWholeImageRequestBody.php new file mode 100755 index 0000000..8b4026b --- /dev/null +++ b/Services/Ims/V2/Model/CreateWholeImageRequestBody.php @@ -0,0 +1,630 @@ +,长度不能超过1024个字符。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 弹性云服务器ID。使用弹性云服务器制作整机镜像时使用此参数且必填。 如果使用备份创建整机镜像,该参数应换成backup_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * tags 镜像标签列表。tags和image_tags只能使用一个。 + * backupId 使用云服务器备份创建整机镜像使用此参数且必填。 如果使用ECS创建整机镜像,则该参数应传为instance_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * wholeImageType 使用备份创建整机镜像时,该字段区分是CBR服务的备份还是CSBS服务的备份,取值为:CBR/CSBS。 使用ECS创建整机镜像时,该字段不填 + * maxRam 表示镜像支持的最大内存,单位为MB,默认不设置。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0。 + * vaultId 表示云服务器待加入的或已加入的存储库的ID。 使用云服务器创建整机镜像的过程为:先创建一个备份,再将备份创建为整机镜像。如果这个备份为CBR,vault_id为必填项;如果备份为CSBS,vault_id参数可不填。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'enterpriseProjectId' => 'string', + 'imageTags' => '\G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]', + 'instanceId' => 'string', + 'name' => 'string', + 'tags' => 'string[]', + 'backupId' => 'string', + 'wholeImageType' => 'string', + 'maxRam' => 'int', + 'minRam' => 'int', + 'vaultId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 弹性云服务器ID。使用弹性云服务器制作整机镜像时使用此参数且必填。 如果使用备份创建整机镜像,该参数应换成backup_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * tags 镜像标签列表。tags和image_tags只能使用一个。 + * backupId 使用云服务器备份创建整机镜像使用此参数且必填。 如果使用ECS创建整机镜像,则该参数应传为instance_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * wholeImageType 使用备份创建整机镜像时,该字段区分是CBR服务的备份还是CSBS服务的备份,取值为:CBR/CSBS。 使用ECS创建整机镜像时,该字段不填 + * maxRam 表示镜像支持的最大内存,单位为MB,默认不设置。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0。 + * vaultId 表示云服务器待加入的或已加入的存储库的ID。 使用云服务器创建整机镜像的过程为:先创建一个备份,再将备份创建为整机镜像。如果这个备份为CBR,vault_id为必填项;如果备份为CSBS,vault_id参数可不填。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'description' => null, + 'enterpriseProjectId' => null, + 'imageTags' => null, + 'instanceId' => null, + 'name' => null, + 'tags' => null, + 'backupId' => null, + 'wholeImageType' => null, + 'maxRam' => 'int32', + 'minRam' => 'int32', + 'vaultId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 弹性云服务器ID。使用弹性云服务器制作整机镜像时使用此参数且必填。 如果使用备份创建整机镜像,该参数应换成backup_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * tags 镜像标签列表。tags和image_tags只能使用一个。 + * backupId 使用云服务器备份创建整机镜像使用此参数且必填。 如果使用ECS创建整机镜像,则该参数应传为instance_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * wholeImageType 使用备份创建整机镜像时,该字段区分是CBR服务的备份还是CSBS服务的备份,取值为:CBR/CSBS。 使用ECS创建整机镜像时,该字段不填 + * maxRam 表示镜像支持的最大内存,单位为MB,默认不设置。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0。 + * vaultId 表示云服务器待加入的或已加入的存储库的ID。 使用云服务器创建整机镜像的过程为:先创建一个备份,再将备份创建为整机镜像。如果这个备份为CBR,vault_id为必填项;如果备份为CSBS,vault_id参数可不填。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description', + 'enterpriseProjectId' => 'enterprise_project_id', + 'imageTags' => 'image_tags', + 'instanceId' => 'instance_id', + 'name' => 'name', + 'tags' => 'tags', + 'backupId' => 'backup_id', + 'wholeImageType' => 'whole_image_type', + 'maxRam' => 'max_ram', + 'minRam' => 'min_ram', + 'vaultId' => 'vault_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 弹性云服务器ID。使用弹性云服务器制作整机镜像时使用此参数且必填。 如果使用备份创建整机镜像,该参数应换成backup_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * tags 镜像标签列表。tags和image_tags只能使用一个。 + * backupId 使用云服务器备份创建整机镜像使用此参数且必填。 如果使用ECS创建整机镜像,则该参数应传为instance_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * wholeImageType 使用备份创建整机镜像时,该字段区分是CBR服务的备份还是CSBS服务的备份,取值为:CBR/CSBS。 使用ECS创建整机镜像时,该字段不填 + * maxRam 表示镜像支持的最大内存,单位为MB,默认不设置。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0。 + * vaultId 表示云服务器待加入的或已加入的存储库的ID。 使用云服务器创建整机镜像的过程为:先创建一个备份,再将备份创建为整机镜像。如果这个备份为CBR,vault_id为必填项;如果备份为CSBS,vault_id参数可不填。 + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'imageTags' => 'setImageTags', + 'instanceId' => 'setInstanceId', + 'name' => 'setName', + 'tags' => 'setTags', + 'backupId' => 'setBackupId', + 'wholeImageType' => 'setWholeImageType', + 'maxRam' => 'setMaxRam', + 'minRam' => 'setMinRam', + 'vaultId' => 'setVaultId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * instanceId 弹性云服务器ID。使用弹性云服务器制作整机镜像时使用此参数且必填。 如果使用备份创建整机镜像,该参数应换成backup_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * tags 镜像标签列表。tags和image_tags只能使用一个。 + * backupId 使用云服务器备份创建整机镜像使用此参数且必填。 如果使用ECS创建整机镜像,则该参数应传为instance_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * wholeImageType 使用备份创建整机镜像时,该字段区分是CBR服务的备份还是CSBS服务的备份,取值为:CBR/CSBS。 使用ECS创建整机镜像时,该字段不填 + * maxRam 表示镜像支持的最大内存,单位为MB,默认不设置。 + * minRam 表示镜像支持的最小内存,单位为MB,默认为0。 + * vaultId 表示云服务器待加入的或已加入的存储库的ID。 使用云服务器创建整机镜像的过程为:先创建一个备份,再将备份创建为整机镜像。如果这个备份为CBR,vault_id为必填项;如果备份为CSBS,vault_id参数可不填。 + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'imageTags' => 'getImageTags', + 'instanceId' => 'getInstanceId', + 'name' => 'getName', + 'tags' => 'getTags', + 'backupId' => 'getBackupId', + 'wholeImageType' => 'getWholeImageType', + 'maxRam' => 'getMaxRam', + 'minRam' => 'getMinRam', + 'vaultId' => 'getVaultId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : '0'; + $this->container['imageTags'] = isset($data['imageTags']) ? $data['imageTags'] : null; + $this->container['instanceId'] = isset($data['instanceId']) ? $data['instanceId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['backupId'] = isset($data['backupId']) ? $data['backupId'] : null; + $this->container['wholeImageType'] = isset($data['wholeImageType']) ? $data['wholeImageType'] : null; + $this->container['maxRam'] = isset($data['maxRam']) ? $data['maxRam'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : 0; + $this->container['vaultId'] = isset($data['vaultId']) ? $data['vaultId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 128)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 128."; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets description + * 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目。取值为UUID,表示属于该UUID对应的企业项目。关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets imageTags + * 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]|null + */ + public function getImageTags() + { + return $this->container['imageTags']; + } + + /** + * Sets imageTags + * + * @param \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]|null $imageTags 新规范的镜像标签列表。默认为空。tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setImageTags($imageTags) + { + $this->container['imageTags'] = $imageTags; + return $this; + } + + /** + * Gets instanceId + * 弹性云服务器ID。使用弹性云服务器制作整机镜像时使用此参数且必填。 如果使用备份创建整机镜像,该参数应换成backup_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * + * @return string|null + */ + public function getInstanceId() + { + return $this->container['instanceId']; + } + + /** + * Sets instanceId + * + * @param string|null $instanceId 弹性云服务器ID。使用弹性云服务器制作整机镜像时使用此参数且必填。 如果使用备份创建整机镜像,该参数应换成backup_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * + * @return $this + */ + public function setInstanceId($instanceId) + { + $this->container['instanceId'] = $instanceId; + return $this; + } + + /** + * Gets name + * 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets tags + * 镜像标签列表。tags和image_tags只能使用一个。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表。tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets backupId + * 使用云服务器备份创建整机镜像使用此参数且必填。 如果使用ECS创建整机镜像,则该参数应传为instance_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * + * @return string|null + */ + public function getBackupId() + { + return $this->container['backupId']; + } + + /** + * Sets backupId + * + * @param string|null $backupId 使用云服务器备份创建整机镜像使用此参数且必填。 如果使用ECS创建整机镜像,则该参数应传为instance_id。 非必填的原因是需要兼容“使用备份创建整机镜像”和“使用弹性云服务器制作整机镜像”两种场景的body体。 + * + * @return $this + */ + public function setBackupId($backupId) + { + $this->container['backupId'] = $backupId; + return $this; + } + + /** + * Gets wholeImageType + * 使用备份创建整机镜像时,该字段区分是CBR服务的备份还是CSBS服务的备份,取值为:CBR/CSBS。 使用ECS创建整机镜像时,该字段不填 + * + * @return string|null + */ + public function getWholeImageType() + { + return $this->container['wholeImageType']; + } + + /** + * Sets wholeImageType + * + * @param string|null $wholeImageType 使用备份创建整机镜像时,该字段区分是CBR服务的备份还是CSBS服务的备份,取值为:CBR/CSBS。 使用ECS创建整机镜像时,该字段不填 + * + * @return $this + */ + public function setWholeImageType($wholeImageType) + { + $this->container['wholeImageType'] = $wholeImageType; + return $this; + } + + /** + * Gets maxRam + * 表示镜像支持的最大内存,单位为MB,默认不设置。 + * + * @return int|null + */ + public function getMaxRam() + { + return $this->container['maxRam']; + } + + /** + * Sets maxRam + * + * @param int|null $maxRam 表示镜像支持的最大内存,单位为MB,默认不设置。 + * + * @return $this + */ + public function setMaxRam($maxRam) + { + $this->container['maxRam'] = $maxRam; + return $this; + } + + /** + * Gets minRam + * 表示镜像支持的最小内存,单位为MB,默认为0。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 表示镜像支持的最小内存,单位为MB,默认为0。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets vaultId + * 表示云服务器待加入的或已加入的存储库的ID。 使用云服务器创建整机镜像的过程为:先创建一个备份,再将备份创建为整机镜像。如果这个备份为CBR,vault_id为必填项;如果备份为CSBS,vault_id参数可不填。 + * + * @return string|null + */ + public function getVaultId() + { + return $this->container['vaultId']; + } + + /** + * Sets vaultId + * + * @param string|null $vaultId 表示云服务器待加入的或已加入的存储库的ID。 使用云服务器创建整机镜像的过程为:先创建一个备份,再将备份创建为整机镜像。如果这个备份为CBR,vault_id为必填项;如果备份为CSBS,vault_id参数可不填。 + * + * @return $this + */ + public function setVaultId($vaultId) + { + $this->container['vaultId'] = $vaultId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/CreateWholeImageResponse.php b/Services/Ims/V2/Model/CreateWholeImageResponse.php new file mode 100755 index 0000000..bc2d64e --- /dev/null +++ b/Services/Ims/V2/Model/CreateWholeImageResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/DeleteImageTagRequest.php b/Services/Ims/V2/Model/DeleteImageTagRequest.php new file mode 100755 index 0000000..e8086b2 --- /dev/null +++ b/Services/Ims/V2/Model/DeleteImageTagRequest.php @@ -0,0 +1,306 @@ + 'string', + 'key' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 + * key 要删除的标签的键。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'key' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 + * key 要删除的标签的键。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'key' => 'key' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 + * key 要删除的标签的键。 + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'key' => 'setKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 + * key 要删除的标签的键。 + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'key' => 'getKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets key + * 要删除的标签的键。 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 要删除的标签的键。 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/DeleteImageTagResponse.php b/Services/Ims/V2/Model/DeleteImageTagResponse.php new file mode 100755 index 0000000..eb109b6 --- /dev/null +++ b/Services/Ims/V2/Model/DeleteImageTagResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ExportImageRequest.php b/Services/Ims/V2/Model/ExportImageRequest.php new file mode 100755 index 0000000..3eaf96c --- /dev/null +++ b/Services/Ims/V2/Model/ExportImageRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\ExportImageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\ExportImageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\ExportImageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ExportImageRequestBody.php b/Services/Ims/V2/Model/ExportImageRequestBody.php new file mode 100755 index 0000000..b6b9454 --- /dev/null +++ b/Services/Ims/V2/Model/ExportImageRequestBody.php @@ -0,0 +1,368 @@ +:。 说明:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * fileFormat 文件格式,支持qcow2、vhd、zvhd和vmdk。 + * isQuickExport 是否使用快速导出,取值为true或者false。 说明:若使用快速导出,则无法指定file_format参数。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bucketUrl' => 'string', + 'fileFormat' => 'string', + 'isQuickExport' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * bucketUrl 目的文件的URL,格式::。 说明:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * fileFormat 文件格式,支持qcow2、vhd、zvhd和vmdk。 + * isQuickExport 是否使用快速导出,取值为true或者false。 说明:若使用快速导出,则无法指定file_format参数。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'bucketUrl' => null, + 'fileFormat' => null, + 'isQuickExport' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * bucketUrl 目的文件的URL,格式::。 说明:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * fileFormat 文件格式,支持qcow2、vhd、zvhd和vmdk。 + * isQuickExport 是否使用快速导出,取值为true或者false。 说明:若使用快速导出,则无法指定file_format参数。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'bucketUrl' => 'bucket_url', + 'fileFormat' => 'file_format', + 'isQuickExport' => 'is_quick_export' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * bucketUrl 目的文件的URL,格式::。 说明:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * fileFormat 文件格式,支持qcow2、vhd、zvhd和vmdk。 + * isQuickExport 是否使用快速导出,取值为true或者false。 说明:若使用快速导出,则无法指定file_format参数。 + * + * @var string[] + */ + protected static $setters = [ + 'bucketUrl' => 'setBucketUrl', + 'fileFormat' => 'setFileFormat', + 'isQuickExport' => 'setIsQuickExport' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * bucketUrl 目的文件的URL,格式::。 说明:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * fileFormat 文件格式,支持qcow2、vhd、zvhd和vmdk。 + * isQuickExport 是否使用快速导出,取值为true或者false。 说明:若使用快速导出,则无法指定file_format参数。 + * + * @var string[] + */ + protected static $getters = [ + 'bucketUrl' => 'getBucketUrl', + 'fileFormat' => 'getFileFormat', + 'isQuickExport' => 'getIsQuickExport' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const FILE_FORMAT_QCOW2 = 'qcow2'; + const FILE_FORMAT_VHD = 'vhd'; + const FILE_FORMAT_ZVHD = 'zvhd'; + const FILE_FORMAT_VMDK = 'vmdk'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFileFormatAllowableValues() + { + return [ + self::FILE_FORMAT_QCOW2, + self::FILE_FORMAT_VHD, + self::FILE_FORMAT_ZVHD, + self::FILE_FORMAT_VMDK, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['bucketUrl'] = isset($data['bucketUrl']) ? $data['bucketUrl'] : null; + $this->container['fileFormat'] = isset($data['fileFormat']) ? $data['fileFormat'] : null; + $this->container['isQuickExport'] = isset($data['isQuickExport']) ? $data['isQuickExport'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['bucketUrl'] === null) { + $invalidProperties[] = "'bucketUrl' can't be null"; + } + if ($this->container['fileFormat'] === null) { + $invalidProperties[] = "'fileFormat' can't be null"; + } + $allowedValues = $this->getFileFormatAllowableValues(); + if (!is_null($this->container['fileFormat']) && !in_array($this->container['fileFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'fileFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets bucketUrl + * 目的文件的URL,格式::。 说明:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * + * @return string + */ + public function getBucketUrl() + { + return $this->container['bucketUrl']; + } + + /** + * Sets bucketUrl + * + * @param string $bucketUrl 目的文件的URL,格式::。 说明:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * + * @return $this + */ + public function setBucketUrl($bucketUrl) + { + $this->container['bucketUrl'] = $bucketUrl; + return $this; + } + + /** + * Gets fileFormat + * 文件格式,支持qcow2、vhd、zvhd和vmdk。 + * + * @return string + */ + public function getFileFormat() + { + return $this->container['fileFormat']; + } + + /** + * Sets fileFormat + * + * @param string $fileFormat 文件格式,支持qcow2、vhd、zvhd和vmdk。 + * + * @return $this + */ + public function setFileFormat($fileFormat) + { + $this->container['fileFormat'] = $fileFormat; + return $this; + } + + /** + * Gets isQuickExport + * 是否使用快速导出,取值为true或者false。 说明:若使用快速导出,则无法指定file_format参数。 + * + * @return bool|null + */ + public function getIsQuickExport() + { + return $this->container['isQuickExport']; + } + + /** + * Sets isQuickExport + * + * @param bool|null $isQuickExport 是否使用快速导出,取值为true或者false。 说明:若使用快速导出,则无法指定file_format参数。 + * + * @return $this + */ + public function setIsQuickExport($isQuickExport) + { + $this->container['isQuickExport'] = $isQuickExport; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ExportImageResponse.php b/Services/Ims/V2/Model/ExportImageResponse.php new file mode 100755 index 0000000..c261e69 --- /dev/null +++ b/Services/Ims/V2/Model/ExportImageResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceAddImageMemberRequest.php b/Services/Ims/V2/Model/GlanceAddImageMemberRequest.php new file mode 100755 index 0000000..cf4e81e --- /dev/null +++ b/Services/Ims/V2/Model/GlanceAddImageMemberRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\GlanceAddImageMemberRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像id + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像id + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像id + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像id + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像id + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像id + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\GlanceAddImageMemberRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\GlanceAddImageMemberRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceAddImageMemberRequestBody.php b/Services/Ims/V2/Model/GlanceAddImageMemberRequestBody.php new file mode 100755 index 0000000..752ccb3 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceAddImageMemberRequestBody.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * member 镜像成员。取值为目标用户的项目ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'member' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * member 镜像成员。取值为目标用户的项目ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'member' => 'member' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * member 镜像成员。取值为目标用户的项目ID。 + * + * @var string[] + */ + protected static $setters = [ + 'member' => 'setMember' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * member 镜像成员。取值为目标用户的项目ID。 + * + * @var string[] + */ + protected static $getters = [ + 'member' => 'getMember' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['member'] = isset($data['member']) ? $data['member'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['member'] === null) { + $invalidProperties[] = "'member' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets member + * 镜像成员。取值为目标用户的项目ID。 + * + * @return string + */ + public function getMember() + { + return $this->container['member']; + } + + /** + * Sets member + * + * @param string $member 镜像成员。取值为目标用户的项目ID。 + * + * @return $this + */ + public function setMember($member) + { + $this->container['member'] = $member; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceAddImageMemberResponse.php b/Services/Ims/V2/Model/GlanceAddImageMemberResponse.php new file mode 100755 index 0000000..6f16caf --- /dev/null +++ b/Services/Ims/V2/Model/GlanceAddImageMemberResponse.php @@ -0,0 +1,441 @@ + 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string', + 'imageId' => 'string', + 'memberId' => 'string', + 'schema' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'createdAt' => null, + 'updatedAt' => null, + 'imageId' => null, + 'memberId' => null, + 'schema' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'imageId' => 'image_id', + 'memberId' => 'member_id', + 'schema' => 'schema' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', + 'imageId' => 'setImageId', + 'memberId' => 'setMemberId', + 'schema' => 'setSchema' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', + 'imageId' => 'getImageId', + 'memberId' => 'getMemberId', + 'schema' => 'getSchema' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['memberId'] = isset($data['memberId']) ? $data['memberId'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 共享状态 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 共享状态 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets createdAt + * 共享时间,格式为UTC时间 + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 共享时间,格式为UTC时间 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 更新时间,格式为UTC时间 + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 更新时间,格式为UTC时间 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string|null + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string|null $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets memberId + * 成员ID + * + * @return string|null + */ + public function getMemberId() + { + return $this->container['memberId']; + } + + /** + * Sets memberId + * + * @param string|null $memberId 成员ID + * + * @return $this + */ + public function setMemberId($memberId) + { + $this->container['memberId'] = $memberId; + return $this; + } + + /** + * Gets schema + * 共享视图 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 共享视图 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceCreateImageMetadataRequest.php b/Services/Ims/V2/Model/GlanceCreateImageMetadataRequest.php new file mode 100755 index 0000000..d45b34a --- /dev/null +++ b/Services/Ims/V2/Model/GlanceCreateImageMetadataRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\GlanceCreateImageMetadataRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\GlanceCreateImageMetadataRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\GlanceCreateImageMetadataRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceCreateImageMetadataRequestBody.php b/Services/Ims/V2/Model/GlanceCreateImageMetadataRequestBody.php new file mode 100755 index 0000000..de877ec --- /dev/null +++ b/Services/Ims/V2/Model/GlanceCreateImageMetadataRequestBody.php @@ -0,0 +1,580 @@ + 'string', + 'containerFormat' => 'string', + 'diskFormat' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'protected' => 'bool', + 'tags' => 'string[]', + 'visibility' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * osVersion 镜像的操作系统具体版本,如果未指定__os_version,则默认设置为Other Linux(64 bit),不保证该镜像能成功创建虚拟机以及通过该镜像创建的虚拟机能够正常使用。 + * containerFormat 容器格式。默认取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd,zvhd、zvhd2、raw,qcow2。默认取值为vhd + * minDisk 镜像运行需要的最小磁盘,单位为GB 。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据云主机云服务器的规格限制。默认取值为0。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1-255位。 + * protected 镜像是否被保护,保护后的镜像不可删除。默认取值为false。 + * tags 镜像标签列表。长度为1-255位。默认为空。 + * visibility 其他租户是否可见。默认取值为private。创建镜像元数据时,visibility取值只能为private。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'osVersion' => null, + 'containerFormat' => null, + 'diskFormat' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'protected' => null, + 'tags' => null, + 'visibility' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * osVersion 镜像的操作系统具体版本,如果未指定__os_version,则默认设置为Other Linux(64 bit),不保证该镜像能成功创建虚拟机以及通过该镜像创建的虚拟机能够正常使用。 + * containerFormat 容器格式。默认取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd,zvhd、zvhd2、raw,qcow2。默认取值为vhd + * minDisk 镜像运行需要的最小磁盘,单位为GB 。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据云主机云服务器的规格限制。默认取值为0。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1-255位。 + * protected 镜像是否被保护,保护后的镜像不可删除。默认取值为false。 + * tags 镜像标签列表。长度为1-255位。默认为空。 + * visibility 其他租户是否可见。默认取值为private。创建镜像元数据时,visibility取值只能为private。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'osVersion' => '__os_version', + 'containerFormat' => 'container_format', + 'diskFormat' => 'disk_format', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'protected' => 'protected', + 'tags' => 'tags', + 'visibility' => 'visibility' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * osVersion 镜像的操作系统具体版本,如果未指定__os_version,则默认设置为Other Linux(64 bit),不保证该镜像能成功创建虚拟机以及通过该镜像创建的虚拟机能够正常使用。 + * containerFormat 容器格式。默认取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd,zvhd、zvhd2、raw,qcow2。默认取值为vhd + * minDisk 镜像运行需要的最小磁盘,单位为GB 。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据云主机云服务器的规格限制。默认取值为0。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1-255位。 + * protected 镜像是否被保护,保护后的镜像不可删除。默认取值为false。 + * tags 镜像标签列表。长度为1-255位。默认为空。 + * visibility 其他租户是否可见。默认取值为private。创建镜像元数据时,visibility取值只能为private。 + * + * @var string[] + */ + protected static $setters = [ + 'osVersion' => 'setOsVersion', + 'containerFormat' => 'setContainerFormat', + 'diskFormat' => 'setDiskFormat', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'protected' => 'setProtected', + 'tags' => 'setTags', + 'visibility' => 'setVisibility' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * osVersion 镜像的操作系统具体版本,如果未指定__os_version,则默认设置为Other Linux(64 bit),不保证该镜像能成功创建虚拟机以及通过该镜像创建的虚拟机能够正常使用。 + * containerFormat 容器格式。默认取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd,zvhd、zvhd2、raw,qcow2。默认取值为vhd + * minDisk 镜像运行需要的最小磁盘,单位为GB 。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据云主机云服务器的规格限制。默认取值为0。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1-255位。 + * protected 镜像是否被保护,保护后的镜像不可删除。默认取值为false。 + * tags 镜像标签列表。长度为1-255位。默认为空。 + * visibility 其他租户是否可见。默认取值为private。创建镜像元数据时,visibility取值只能为private。 + * + * @var string[] + */ + protected static $getters = [ + 'osVersion' => 'getOsVersion', + 'containerFormat' => 'getContainerFormat', + 'diskFormat' => 'getDiskFormat', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'protected' => 'getProtected', + 'tags' => 'getTags', + 'visibility' => 'getVisibility' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const DISK_FORMAT_VHD = 'vhd'; + const DISK_FORMAT_ZVHD = 'zvhd'; + const DISK_FORMAT_ZVHD2 = 'zvhd2'; + const DISK_FORMAT_RAW = 'raw'; + const DISK_FORMAT_QCOW2 = 'qcow2'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDiskFormatAllowableValues() + { + return [ + self::DISK_FORMAT_VHD, + self::DISK_FORMAT_ZVHD, + self::DISK_FORMAT_ZVHD2, + self::DISK_FORMAT_RAW, + self::DISK_FORMAT_QCOW2, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : 'bare'; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : 40; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : 0; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : false; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : 'private'; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getDiskFormatAllowableValues(); + if (!is_null($this->container['diskFormat']) && !in_array($this->container['diskFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'diskFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 255)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 255."; + } + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets osVersion + * 镜像的操作系统具体版本,如果未指定__os_version,则默认设置为Other Linux(64 bit),不保证该镜像能成功创建虚拟机以及通过该镜像创建的虚拟机能够正常使用。 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 镜像的操作系统具体版本,如果未指定__os_version,则默认设置为Other Linux(64 bit),不保证该镜像能成功创建虚拟机以及通过该镜像创建的虚拟机能够正常使用。 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets containerFormat + * 容器格式。默认取值为bare。 + * + * @return string|null + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string|null $containerFormat 容器格式。默认取值为bare。 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets diskFormat + * 镜像文件格式。目前支持vhd,zvhd、zvhd2、raw,qcow2。默认取值为vhd + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像文件格式。目前支持vhd,zvhd、zvhd2、raw,qcow2。默认取值为vhd + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘,单位为GB 。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘,单位为GB 。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行需要的最小内存,单位为MB。参数取值依据云主机云服务器的规格限制。默认取值为0。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 镜像运行需要的最小内存,单位为MB。参数取值依据云主机云服务器的规格限制。默认取值为0。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1-255位。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1-255位。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets protected + * 镜像是否被保护,保护后的镜像不可删除。默认取值为false。 + * + * @return bool|null + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool|null $protected 镜像是否被保护,保护后的镜像不可删除。默认取值为false。 + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets tags + * 镜像标签列表。长度为1-255位。默认为空。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表。长度为1-255位。默认为空。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets visibility + * 其他租户是否可见。默认取值为private。创建镜像元数据时,visibility取值只能为private。 + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string|null $visibility 其他租户是否可见。默认取值为private。创建镜像元数据时,visibility取值只能为private。 + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceCreateImageMetadataResponse.php b/Services/Ims/V2/Model/GlanceCreateImageMetadataResponse.php new file mode 100755 index 0000000..43c7985 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceCreateImageMetadataResponse.php @@ -0,0 +1,1422 @@ + 'string', + 'name' => 'string', + 'protected' => 'bool', + 'containerFormat' => 'string', + 'diskFormat' => 'string', + 'tags' => 'string[]', + 'minRam' => 'int', + 'minDisk' => 'int', + 'status' => 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string', + 'self' => 'string', + 'id' => 'string', + 'file' => 'string', + 'schema' => 'string', + 'imageSourceType' => 'string', + 'imageSize' => 'string', + 'isregistered' => 'string', + 'osVersion' => 'string', + 'osType' => 'string', + 'platform' => 'string', + 'osBit' => 'string', + 'imagetype' => 'string', + 'virtualEnvType' => 'string', + 'owner' => 'string', + 'virtualSize' => 'int', + 'properties' => 'object', + 'rootOrigin' => 'string', + 'checksum' => 'string', + 'size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * visibility 其他租户是否可见。取值为private。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1~128位。 + * protected 镜像是否被保护,保护后的镜像不可删除。取值为false + * containerFormat 容器格式。取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd、zvhd、raw、qcow2。默认值是vhd。 + * tags 镜像标签列表。长度为1~255位。 + * minRam 镜像运行最小内存,单位为MB。取值参考ECS规格限制,一般设置为0。云服务器的规格限制,请参见规格清单。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB 。取值为40~1024GB。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * createdAt 创建时间。格式为UTC时间。 + * updatedAt 更新时间。格式为UTC时间。 + * self 本镜像链接。 + * id 镜像ID,用户调用创建镜像接口后,需保存该镜像的ID,用来调用上传镜像接口完成镜像上传。 + * file 上传下载镜像文件的地址链接。 + * schema 视图链接。 + * imageSourceType 镜像后端存储类型,目前支持uds。 + * imageSize 镜像大小。单位为字节。 + * isregistered 镜像是否注册。只有已注册的镜像才能在Portal界面上查询到。取值为true。 + * osVersion 镜像的操作系统具体版本。 + * osType 镜像的操作系统类型,取值由__os_version确定。支持Windows、Linux和other。 + * platform 表示镜像支持的操作系统平台。取值由__os_version确定 + * osBit 表示操作系统位数。取值由__os_version确定,取值为32或64。 + * imagetype 镜像类型。取值为private,表示私有镜像。 + * virtualEnvType 平台类型。镜像使用环境类型:FusionCompute、Ironic、DataImage。如果是云主机云服务器镜像,则取值为FusionCompute。如果是数据卷镜像则取值是DataImage。如果是物理机裸金属服务器镜像,则取值是Ironic。 + * owner 镜像所属项目ID。 + * virtualSize 镜像虚拟大小。单位为字节。 + * properties 镜像属性的集合,不表示具体的镜像属性 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file + * checksum 镜像文件md5值。 + * size 目前暂时不使用。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'visibility' => null, + 'name' => null, + 'protected' => null, + 'containerFormat' => null, + 'diskFormat' => null, + 'tags' => null, + 'minRam' => 'int32', + 'minDisk' => 'int32', + 'status' => null, + 'createdAt' => null, + 'updatedAt' => null, + 'self' => null, + 'id' => null, + 'file' => null, + 'schema' => null, + 'imageSourceType' => null, + 'imageSize' => null, + 'isregistered' => null, + 'osVersion' => null, + 'osType' => null, + 'platform' => null, + 'osBit' => null, + 'imagetype' => null, + 'virtualEnvType' => null, + 'owner' => null, + 'virtualSize' => 'int32', + 'properties' => null, + 'rootOrigin' => null, + 'checksum' => null, + 'size' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * visibility 其他租户是否可见。取值为private。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1~128位。 + * protected 镜像是否被保护,保护后的镜像不可删除。取值为false + * containerFormat 容器格式。取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd、zvhd、raw、qcow2。默认值是vhd。 + * tags 镜像标签列表。长度为1~255位。 + * minRam 镜像运行最小内存,单位为MB。取值参考ECS规格限制,一般设置为0。云服务器的规格限制,请参见规格清单。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB 。取值为40~1024GB。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * createdAt 创建时间。格式为UTC时间。 + * updatedAt 更新时间。格式为UTC时间。 + * self 本镜像链接。 + * id 镜像ID,用户调用创建镜像接口后,需保存该镜像的ID,用来调用上传镜像接口完成镜像上传。 + * file 上传下载镜像文件的地址链接。 + * schema 视图链接。 + * imageSourceType 镜像后端存储类型,目前支持uds。 + * imageSize 镜像大小。单位为字节。 + * isregistered 镜像是否注册。只有已注册的镜像才能在Portal界面上查询到。取值为true。 + * osVersion 镜像的操作系统具体版本。 + * osType 镜像的操作系统类型,取值由__os_version确定。支持Windows、Linux和other。 + * platform 表示镜像支持的操作系统平台。取值由__os_version确定 + * osBit 表示操作系统位数。取值由__os_version确定,取值为32或64。 + * imagetype 镜像类型。取值为private,表示私有镜像。 + * virtualEnvType 平台类型。镜像使用环境类型:FusionCompute、Ironic、DataImage。如果是云主机云服务器镜像,则取值为FusionCompute。如果是数据卷镜像则取值是DataImage。如果是物理机裸金属服务器镜像,则取值是Ironic。 + * owner 镜像所属项目ID。 + * virtualSize 镜像虚拟大小。单位为字节。 + * properties 镜像属性的集合,不表示具体的镜像属性 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file + * checksum 镜像文件md5值。 + * size 目前暂时不使用。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'visibility' => 'visibility', + 'name' => 'name', + 'protected' => 'protected', + 'containerFormat' => 'container_format', + 'diskFormat' => 'disk_format', + 'tags' => 'tags', + 'minRam' => 'min_ram', + 'minDisk' => 'min_disk', + 'status' => 'status', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'self' => 'self', + 'id' => 'id', + 'file' => 'file', + 'schema' => 'schema', + 'imageSourceType' => '__image_source_type', + 'imageSize' => '__image_size', + 'isregistered' => '__isregistered', + 'osVersion' => '__os_version', + 'osType' => '__os_type', + 'platform' => '__platform', + 'osBit' => '__os_bit', + 'imagetype' => '__imagetype', + 'virtualEnvType' => 'virtual_env_type', + 'owner' => 'owner', + 'virtualSize' => 'virtual_size', + 'properties' => 'properties', + 'rootOrigin' => '__root_origin', + 'checksum' => 'checksum', + 'size' => 'size' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * visibility 其他租户是否可见。取值为private。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1~128位。 + * protected 镜像是否被保护,保护后的镜像不可删除。取值为false + * containerFormat 容器格式。取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd、zvhd、raw、qcow2。默认值是vhd。 + * tags 镜像标签列表。长度为1~255位。 + * minRam 镜像运行最小内存,单位为MB。取值参考ECS规格限制,一般设置为0。云服务器的规格限制,请参见规格清单。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB 。取值为40~1024GB。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * createdAt 创建时间。格式为UTC时间。 + * updatedAt 更新时间。格式为UTC时间。 + * self 本镜像链接。 + * id 镜像ID,用户调用创建镜像接口后,需保存该镜像的ID,用来调用上传镜像接口完成镜像上传。 + * file 上传下载镜像文件的地址链接。 + * schema 视图链接。 + * imageSourceType 镜像后端存储类型,目前支持uds。 + * imageSize 镜像大小。单位为字节。 + * isregistered 镜像是否注册。只有已注册的镜像才能在Portal界面上查询到。取值为true。 + * osVersion 镜像的操作系统具体版本。 + * osType 镜像的操作系统类型,取值由__os_version确定。支持Windows、Linux和other。 + * platform 表示镜像支持的操作系统平台。取值由__os_version确定 + * osBit 表示操作系统位数。取值由__os_version确定,取值为32或64。 + * imagetype 镜像类型。取值为private,表示私有镜像。 + * virtualEnvType 平台类型。镜像使用环境类型:FusionCompute、Ironic、DataImage。如果是云主机云服务器镜像,则取值为FusionCompute。如果是数据卷镜像则取值是DataImage。如果是物理机裸金属服务器镜像,则取值是Ironic。 + * owner 镜像所属项目ID。 + * virtualSize 镜像虚拟大小。单位为字节。 + * properties 镜像属性的集合,不表示具体的镜像属性 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file + * checksum 镜像文件md5值。 + * size 目前暂时不使用。 + * + * @var string[] + */ + protected static $setters = [ + 'visibility' => 'setVisibility', + 'name' => 'setName', + 'protected' => 'setProtected', + 'containerFormat' => 'setContainerFormat', + 'diskFormat' => 'setDiskFormat', + 'tags' => 'setTags', + 'minRam' => 'setMinRam', + 'minDisk' => 'setMinDisk', + 'status' => 'setStatus', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', + 'self' => 'setSelf', + 'id' => 'setId', + 'file' => 'setFile', + 'schema' => 'setSchema', + 'imageSourceType' => 'setImageSourceType', + 'imageSize' => 'setImageSize', + 'isregistered' => 'setIsregistered', + 'osVersion' => 'setOsVersion', + 'osType' => 'setOsType', + 'platform' => 'setPlatform', + 'osBit' => 'setOsBit', + 'imagetype' => 'setImagetype', + 'virtualEnvType' => 'setVirtualEnvType', + 'owner' => 'setOwner', + 'virtualSize' => 'setVirtualSize', + 'properties' => 'setProperties', + 'rootOrigin' => 'setRootOrigin', + 'checksum' => 'setChecksum', + 'size' => 'setSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * visibility 其他租户是否可见。取值为private。 + * name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1~128位。 + * protected 镜像是否被保护,保护后的镜像不可删除。取值为false + * containerFormat 容器格式。取值为bare。 + * diskFormat 镜像文件格式。目前支持vhd、zvhd、raw、qcow2。默认值是vhd。 + * tags 镜像标签列表。长度为1~255位。 + * minRam 镜像运行最小内存,单位为MB。取值参考ECS规格限制,一般设置为0。云服务器的规格限制,请参见规格清单。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB 。取值为40~1024GB。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * createdAt 创建时间。格式为UTC时间。 + * updatedAt 更新时间。格式为UTC时间。 + * self 本镜像链接。 + * id 镜像ID,用户调用创建镜像接口后,需保存该镜像的ID,用来调用上传镜像接口完成镜像上传。 + * file 上传下载镜像文件的地址链接。 + * schema 视图链接。 + * imageSourceType 镜像后端存储类型,目前支持uds。 + * imageSize 镜像大小。单位为字节。 + * isregistered 镜像是否注册。只有已注册的镜像才能在Portal界面上查询到。取值为true。 + * osVersion 镜像的操作系统具体版本。 + * osType 镜像的操作系统类型,取值由__os_version确定。支持Windows、Linux和other。 + * platform 表示镜像支持的操作系统平台。取值由__os_version确定 + * osBit 表示操作系统位数。取值由__os_version确定,取值为32或64。 + * imagetype 镜像类型。取值为private,表示私有镜像。 + * virtualEnvType 平台类型。镜像使用环境类型:FusionCompute、Ironic、DataImage。如果是云主机云服务器镜像,则取值为FusionCompute。如果是数据卷镜像则取值是DataImage。如果是物理机裸金属服务器镜像,则取值是Ironic。 + * owner 镜像所属项目ID。 + * virtualSize 镜像虚拟大小。单位为字节。 + * properties 镜像属性的集合,不表示具体的镜像属性 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file + * checksum 镜像文件md5值。 + * size 目前暂时不使用。 + * + * @var string[] + */ + protected static $getters = [ + 'visibility' => 'getVisibility', + 'name' => 'getName', + 'protected' => 'getProtected', + 'containerFormat' => 'getContainerFormat', + 'diskFormat' => 'getDiskFormat', + 'tags' => 'getTags', + 'minRam' => 'getMinRam', + 'minDisk' => 'getMinDisk', + 'status' => 'getStatus', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', + 'self' => 'getSelf', + 'id' => 'getId', + 'file' => 'getFile', + 'schema' => 'getSchema', + 'imageSourceType' => 'getImageSourceType', + 'imageSize' => 'getImageSize', + 'isregistered' => 'getIsregistered', + 'osVersion' => 'getOsVersion', + 'osType' => 'getOsType', + 'platform' => 'getPlatform', + 'osBit' => 'getOsBit', + 'imagetype' => 'getImagetype', + 'virtualEnvType' => 'getVirtualEnvType', + 'owner' => 'getOwner', + 'virtualSize' => 'getVirtualSize', + 'properties' => 'getProperties', + 'rootOrigin' => 'getRootOrigin', + 'checksum' => 'getChecksum', + 'size' => 'getSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const DISK_FORMAT_VHD = 'vhd'; + const DISK_FORMAT_ZVHD = 'zvhd'; + const DISK_FORMAT_RAW = 'raw'; + const DISK_FORMAT_QCOW2 = 'qcow2'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_OTHER = 'other'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDiskFormatAllowableValues() + { + return [ + self::DISK_FORMAT_VHD, + self::DISK_FORMAT_ZVHD, + self::DISK_FORMAT_RAW, + self::DISK_FORMAT_QCOW2, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_WINDOWS, + self::OS_TYPE_LINUX, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : null; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['self'] = isset($data['self']) ? $data['self'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['file'] = isset($data['file']) ? $data['file'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + $this->container['imageSourceType'] = isset($data['imageSourceType']) ? $data['imageSourceType'] : null; + $this->container['imageSize'] = isset($data['imageSize']) ? $data['imageSize'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['virtualSize'] = isset($data['virtualSize']) ? $data['virtualSize'] : null; + $this->container['properties'] = isset($data['properties']) ? $data['properties'] : null; + $this->container['rootOrigin'] = isset($data['rootOrigin']) ? $data['rootOrigin'] : null; + $this->container['checksum'] = isset($data['checksum']) ? $data['checksum'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 128)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 128."; + } + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + $allowedValues = $this->getDiskFormatAllowableValues(); + if (!is_null($this->container['diskFormat']) && !in_array($this->container['diskFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'diskFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] > 1024)) { + $invalidProperties[] = "invalid value for 'minDisk', must be smaller than or equal to 1024."; + } + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] < 40)) { + $invalidProperties[] = "invalid value for 'minDisk', must be bigger than or equal to 40."; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets visibility + * 其他租户是否可见。取值为private。 + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string|null $visibility 其他租户是否可见。取值为private。 + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets name + * 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1~128位。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1~128位。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets protected + * 镜像是否被保护,保护后的镜像不可删除。取值为false + * + * @return bool|null + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool|null $protected 镜像是否被保护,保护后的镜像不可删除。取值为false + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets containerFormat + * 容器格式。取值为bare。 + * + * @return string|null + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string|null $containerFormat 容器格式。取值为bare。 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets diskFormat + * 镜像文件格式。目前支持vhd、zvhd、raw、qcow2。默认值是vhd。 + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像文件格式。目前支持vhd、zvhd、raw、qcow2。默认值是vhd。 + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets tags + * 镜像标签列表。长度为1~255位。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表。长度为1~255位。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets minRam + * 镜像运行最小内存,单位为MB。取值参考ECS规格限制,一般设置为0。云服务器的规格限制,请参见规格清单。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 镜像运行最小内存,单位为MB。取值参考ECS规格限制,一般设置为0。云服务器的规格限制,请参见规格清单。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘容量,单位为GB 。取值为40~1024GB。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘容量,单位为GB 。取值为40~1024GB。必须大于镜像系统盘容量,否则创建云主机云服务器可能失败。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets createdAt + * 创建时间。格式为UTC时间。 + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 创建时间。格式为UTC时间。 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 更新时间。格式为UTC时间。 + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 更新时间。格式为UTC时间。 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets self + * 本镜像链接。 + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self 本镜像链接。 + * + * @return $this + */ + public function setSelf($self) + { + $this->container['self'] = $self; + return $this; + } + + /** + * Gets id + * 镜像ID,用户调用创建镜像接口后,需保存该镜像的ID,用来调用上传镜像接口完成镜像上传。 + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 镜像ID,用户调用创建镜像接口后,需保存该镜像的ID,用来调用上传镜像接口完成镜像上传。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets file + * 上传下载镜像文件的地址链接。 + * + * @return string|null + */ + public function getFile() + { + return $this->container['file']; + } + + /** + * Sets file + * + * @param string|null $file 上传下载镜像文件的地址链接。 + * + * @return $this + */ + public function setFile($file) + { + $this->container['file'] = $file; + return $this; + } + + /** + * Gets schema + * 视图链接。 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 视图链接。 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Gets imageSourceType + * 镜像后端存储类型,目前支持uds。 + * + * @return string|null + */ + public function getImageSourceType() + { + return $this->container['imageSourceType']; + } + + /** + * Sets imageSourceType + * + * @param string|null $imageSourceType 镜像后端存储类型,目前支持uds。 + * + * @return $this + */ + public function setImageSourceType($imageSourceType) + { + $this->container['imageSourceType'] = $imageSourceType; + return $this; + } + + /** + * Gets imageSize + * 镜像大小。单位为字节。 + * + * @return string|null + */ + public function getImageSize() + { + return $this->container['imageSize']; + } + + /** + * Sets imageSize + * + * @param string|null $imageSize 镜像大小。单位为字节。 + * + * @return $this + */ + public function setImageSize($imageSize) + { + $this->container['imageSize'] = $imageSize; + return $this; + } + + /** + * Gets isregistered + * 镜像是否注册。只有已注册的镜像才能在Portal界面上查询到。取值为true。 + * + * @return string|null + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param string|null $isregistered 镜像是否注册。只有已注册的镜像才能在Portal界面上查询到。取值为true。 + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets osVersion + * 镜像的操作系统具体版本。 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 镜像的操作系统具体版本。 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets osType + * 镜像的操作系统类型,取值由__os_version确定。支持Windows、Linux和other。 + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 镜像的操作系统类型,取值由__os_version确定。支持Windows、Linux和other。 + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets platform + * 表示镜像支持的操作系统平台。取值由__os_version确定 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 表示镜像支持的操作系统平台。取值由__os_version确定 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets osBit + * 表示操作系统位数。取值由__os_version确定,取值为32或64。 + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 表示操作系统位数。取值由__os_version确定,取值为32或64。 + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets imagetype + * 镜像类型。取值为private,表示私有镜像。 + * + * @return string|null + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string|null $imagetype 镜像类型。取值为private,表示私有镜像。 + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets virtualEnvType + * 平台类型。镜像使用环境类型:FusionCompute、Ironic、DataImage。如果是云主机云服务器镜像,则取值为FusionCompute。如果是数据卷镜像则取值是DataImage。如果是物理机裸金属服务器镜像,则取值是Ironic。 + * + * @return string|null + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string|null $virtualEnvType 平台类型。镜像使用环境类型:FusionCompute、Ironic、DataImage。如果是云主机云服务器镜像,则取值为FusionCompute。如果是数据卷镜像则取值是DataImage。如果是物理机裸金属服务器镜像,则取值是Ironic。 + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets owner + * 镜像所属项目ID。 + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner 镜像所属项目ID。 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets virtualSize + * 镜像虚拟大小。单位为字节。 + * + * @return int|null + */ + public function getVirtualSize() + { + return $this->container['virtualSize']; + } + + /** + * Sets virtualSize + * + * @param int|null $virtualSize 镜像虚拟大小。单位为字节。 + * + * @return $this + */ + public function setVirtualSize($virtualSize) + { + $this->container['virtualSize'] = $virtualSize; + return $this; + } + + /** + * Gets properties + * 镜像属性的集合,不表示具体的镜像属性 + * + * @return object|null + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param object|null $properties 镜像属性的集合,不表示具体的镜像属性 + * + * @return $this + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + return $this; + } + + /** + * Gets rootOrigin + * 表示当前镜像来源是从外部导入。取值:file + * + * @return string|null + */ + public function getRootOrigin() + { + return $this->container['rootOrigin']; + } + + /** + * Sets rootOrigin + * + * @param string|null $rootOrigin 表示当前镜像来源是从外部导入。取值:file + * + * @return $this + */ + public function setRootOrigin($rootOrigin) + { + $this->container['rootOrigin'] = $rootOrigin; + return $this; + } + + /** + * Gets checksum + * 镜像文件md5值。 + * + * @return string|null + */ + public function getChecksum() + { + return $this->container['checksum']; + } + + /** + * Sets checksum + * + * @param string|null $checksum 镜像文件md5值。 + * + * @return $this + */ + public function setChecksum($checksum) + { + $this->container['checksum'] = $checksum; + return $this; + } + + /** + * Gets size + * 目前暂时不使用。 + * + * @return int|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size 目前暂时不使用。 + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceCreateTagRequest.php b/Services/Ims/V2/Model/GlanceCreateTagRequest.php new file mode 100755 index 0000000..ec806b3 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceCreateTagRequest.php @@ -0,0 +1,306 @@ + 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'tag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'tag' => 'getTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + if ($this->container['tag'] === null) { + $invalidProperties[] = "'tag' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像id + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像id + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets tag + * 新增的tag。字符串中不能包含“=”和“.”。 + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceCreateTagResponse.php b/Services/Ims/V2/Model/GlanceCreateTagResponse.php new file mode 100755 index 0000000..3407b90 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceCreateTagResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceDeleteImageMemberRequest.php b/Services/Ims/V2/Model/GlanceDeleteImageMemberRequest.php new file mode 100755 index 0000000..118d6bf --- /dev/null +++ b/Services/Ims/V2/Model/GlanceDeleteImageMemberRequest.php @@ -0,0 +1,306 @@ + 'string', + 'memberId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'memberId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'memberId' => 'member_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'memberId' => 'setMemberId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'memberId' => 'getMemberId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['memberId'] = isset($data['memberId']) ? $data['memberId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + if ($this->container['memberId'] === null) { + $invalidProperties[] = "'memberId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像id + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像id + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets memberId + * 成员id + * + * @return string + */ + public function getMemberId() + { + return $this->container['memberId']; + } + + /** + * Sets memberId + * + * @param string $memberId 成员id + * + * @return $this + */ + public function setMemberId($memberId) + { + $this->container['memberId'] = $memberId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceDeleteImageMemberResponse.php b/Services/Ims/V2/Model/GlanceDeleteImageMemberResponse.php new file mode 100755 index 0000000..8473489 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceDeleteImageMemberResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceDeleteImageRequest.php b/Services/Ims/V2/Model/GlanceDeleteImageRequest.php new file mode 100755 index 0000000..1add54a --- /dev/null +++ b/Services/Ims/V2/Model/GlanceDeleteImageRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\GlanceDeleteImageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceDeleteImageRequestBody.php b/Services/Ims/V2/Model/GlanceDeleteImageRequestBody.php new file mode 100755 index 0000000..49575be --- /dev/null +++ b/Services/Ims/V2/Model/GlanceDeleteImageRequestBody.php @@ -0,0 +1,265 @@ + 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * deleteBackup 取值为:true和false true:表示删除整机镜像时,同时删除其关联的云服务器备份。 false:表示只删除整机镜像,不删除其关联的云服务器备份。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'deleteBackup' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * deleteBackup 取值为:true和false true:表示删除整机镜像时,同时删除其关联的云服务器备份。 false:表示只删除整机镜像,不删除其关联的云服务器备份。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'deleteBackup' => 'delete_backup' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * deleteBackup 取值为:true和false true:表示删除整机镜像时,同时删除其关联的云服务器备份。 false:表示只删除整机镜像,不删除其关联的云服务器备份。 + * + * @var string[] + */ + protected static $setters = [ + 'deleteBackup' => 'setDeleteBackup' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * deleteBackup 取值为:true和false true:表示删除整机镜像时,同时删除其关联的云服务器备份。 false:表示只删除整机镜像,不删除其关联的云服务器备份。 + * + * @var string[] + */ + protected static $getters = [ + 'deleteBackup' => 'getDeleteBackup' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['deleteBackup'] = isset($data['deleteBackup']) ? $data['deleteBackup'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets deleteBackup + * 取值为:true和false true:表示删除整机镜像时,同时删除其关联的云服务器备份。 false:表示只删除整机镜像,不删除其关联的云服务器备份。 + * + * @return bool|null + */ + public function getDeleteBackup() + { + return $this->container['deleteBackup']; + } + + /** + * Sets deleteBackup + * + * @param bool|null $deleteBackup 取值为:true和false true:表示删除整机镜像时,同时删除其关联的云服务器备份。 false:表示只删除整机镜像,不删除其关联的云服务器备份。 + * + * @return $this + */ + public function setDeleteBackup($deleteBackup) + { + $this->container['deleteBackup'] = $deleteBackup; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceDeleteImageResponse.php b/Services/Ims/V2/Model/GlanceDeleteImageResponse.php new file mode 100755 index 0000000..c0561cd --- /dev/null +++ b/Services/Ims/V2/Model/GlanceDeleteImageResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceDeleteTagRequest.php b/Services/Ims/V2/Model/GlanceDeleteTagRequest.php new file mode 100755 index 0000000..243bb21 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceDeleteTagRequest.php @@ -0,0 +1,306 @@ + 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'tag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像id + * tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'tag' => 'getTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + if ($this->container['tag'] === null) { + $invalidProperties[] = "'tag' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像id + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像id + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets tag + * 新增的tag。字符串中不能包含“=”和“.”。 + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag 新增的tag。字符串中不能包含“=”和“.”。 + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceDeleteTagResponse.php b/Services/Ims/V2/Model/GlanceDeleteTagResponse.php new file mode 100755 index 0000000..4885096 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceDeleteTagResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceImageMembers.php b/Services/Ims/V2/Model/GlanceImageMembers.php new file mode 100755 index 0000000..aacae86 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceImageMembers.php @@ -0,0 +1,458 @@ + 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string', + 'imageId' => 'string', + 'memberId' => 'string', + 'schema' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 共享状态。 + * createdAt 共享时间,格式为UTC时间。 + * updatedAt 更新时间,格式为UTC时间。 + * imageId 镜像ID。 + * memberId 成员ID。 + * schema 共享视图。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'createdAt' => null, + 'updatedAt' => null, + 'imageId' => null, + 'memberId' => null, + 'schema' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 共享状态。 + * createdAt 共享时间,格式为UTC时间。 + * updatedAt 更新时间,格式为UTC时间。 + * imageId 镜像ID。 + * memberId 成员ID。 + * schema 共享视图。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'imageId' => 'image_id', + 'memberId' => 'member_id', + 'schema' => 'schema' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 共享状态。 + * createdAt 共享时间,格式为UTC时间。 + * updatedAt 更新时间,格式为UTC时间。 + * imageId 镜像ID。 + * memberId 成员ID。 + * schema 共享视图。 + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', + 'imageId' => 'setImageId', + 'memberId' => 'setMemberId', + 'schema' => 'setSchema' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 共享状态。 + * createdAt 共享时间,格式为UTC时间。 + * updatedAt 更新时间,格式为UTC时间。 + * imageId 镜像ID。 + * memberId 成员ID。 + * schema 共享视图。 + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', + 'imageId' => 'getImageId', + 'memberId' => 'getMemberId', + 'schema' => 'getSchema' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['memberId'] = isset($data['memberId']) ? $data['memberId'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + if ($this->container['memberId'] === null) { + $invalidProperties[] = "'memberId' can't be null"; + } + if ($this->container['schema'] === null) { + $invalidProperties[] = "'schema' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 共享状态。 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 共享状态。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets createdAt + * 共享时间,格式为UTC时间。 + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt 共享时间,格式为UTC时间。 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 更新时间,格式为UTC时间。 + * + * @return string + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string $updatedAt 更新时间,格式为UTC时间。 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets memberId + * 成员ID。 + * + * @return string + */ + public function getMemberId() + { + return $this->container['memberId']; + } + + /** + * Sets memberId + * + * @param string $memberId 成员ID。 + * + * @return $this + */ + public function setMemberId($memberId) + { + $this->container['memberId'] = $memberId; + return $this; + } + + /** + * Gets schema + * 共享视图。 + * + * @return string + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string $schema 共享视图。 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImageMemberSchemasRequest.php b/Services/Ims/V2/Model/GlanceListImageMemberSchemasRequest.php new file mode 100755 index 0000000..026dfb7 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImageMemberSchemasRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImageMemberSchemasResponse.php b/Services/Ims/V2/Model/GlanceListImageMemberSchemasResponse.php new file mode 100755 index 0000000..8f86e7e --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImageMemberSchemasResponse.php @@ -0,0 +1,336 @@ + '\G42Cloud\SDK\Ims\V2\Model\Links[]', + 'name' => 'string', + 'properties' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * links 视图链接。 + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型,用途。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'links' => null, + 'name' => null, + 'properties' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * links 视图链接。 + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型,用途。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'links' => 'links', + 'name' => 'name', + 'properties' => 'properties' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * links 视图链接。 + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型,用途。 + * + * @var string[] + */ + protected static $setters = [ + 'links' => 'setLinks', + 'name' => 'setName', + 'properties' => 'setProperties' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * links 视图链接。 + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型,用途。 + * + * @var string[] + */ + protected static $getters = [ + 'links' => 'getLinks', + 'name' => 'getName', + 'properties' => 'getProperties' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['links'] = isset($data['links']) ? $data['links'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['properties'] = isset($data['properties']) ? $data['properties'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets links + * 视图链接。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Links[]|null + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \G42Cloud\SDK\Ims\V2\Model\Links[]|null $links 视图链接。 + * + * @return $this + */ + public function setLinks($links) + { + $this->container['links'] = $links; + return $this; + } + + /** + * Gets name + * 视图名称。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 视图名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets properties + * 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型,用途。 + * + * @return object|null + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param object|null $properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型,用途。 + * + * @return $this + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImageMembersRequest.php b/Services/Ims/V2/Model/GlanceListImageMembersRequest.php new file mode 100755 index 0000000..fa168d4 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImageMembersRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像id + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像id + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像id + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像id + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像id + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像id + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImageMembersResponse.php b/Services/Ims/V2/Model/GlanceListImageMembersResponse.php new file mode 100755 index 0000000..9c3cdeb --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImageMembersResponse.php @@ -0,0 +1,301 @@ + '\G42Cloud\SDK\Ims\V2\Model\GlanceImageMembers[]', + 'schema' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * members 成员信息 + * schema 视图信息 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'members' => null, + 'schema' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * members 成员信息 + * schema 视图信息 + * + * @var string[] + */ + protected static $attributeMap = [ + 'members' => 'members', + 'schema' => 'schema' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * members 成员信息 + * schema 视图信息 + * + * @var string[] + */ + protected static $setters = [ + 'members' => 'setMembers', + 'schema' => 'setSchema' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * members 成员信息 + * schema 视图信息 + * + * @var string[] + */ + protected static $getters = [ + 'members' => 'getMembers', + 'schema' => 'getSchema' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['members'] = isset($data['members']) ? $data['members'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets members + * 成员信息 + * + * @return \G42Cloud\SDK\Ims\V2\Model\GlanceImageMembers[]|null + */ + public function getMembers() + { + return $this->container['members']; + } + + /** + * Sets members + * + * @param \G42Cloud\SDK\Ims\V2\Model\GlanceImageMembers[]|null $members 成员信息 + * + * @return $this + */ + public function setMembers($members) + { + $this->container['members'] = $members; + return $this; + } + + /** + * Gets schema + * 视图信息 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 视图信息 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImageSchemasRequest.php b/Services/Ims/V2/Model/GlanceListImageSchemasRequest.php new file mode 100755 index 0000000..053640e --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImageSchemasRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImageSchemasResponse.php b/Services/Ims/V2/Model/GlanceListImageSchemasResponse.php new file mode 100755 index 0000000..a507c66 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImageSchemasResponse.php @@ -0,0 +1,336 @@ + 'string', + 'properties' => 'object', + 'links' => '\G42Cloud\SDK\Ims\V2\Model\Links[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'properties' => null, + 'links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'properties' => 'properties', + 'links' => 'links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'properties' => 'setProperties', + 'links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'properties' => 'getProperties', + 'links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['properties'] = isset($data['properties']) ? $data['properties'] : null; + $this->container['links'] = isset($data['links']) ? $data['links'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * 视图名称。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 视图名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets properties + * 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @return object|null + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param object|null $properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @return $this + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + return $this; + } + + /** + * Gets links + * 视图链接。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Links[]|null + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \G42Cloud\SDK\Ims\V2\Model\Links[]|null $links 视图链接。 + * + * @return $this + */ + public function setLinks($links) + { + $this->container['links'] = $links; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImagesRequest.php b/Services/Ims/V2/Model/GlanceListImagesRequest.php new file mode 100755 index 0000000..2c6a15c --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImagesRequest.php @@ -0,0 +1,1555 @@ + 'string', + 'isregistered' => 'bool', + 'osBit' => 'string', + 'osType' => 'string', + 'platform' => 'string', + 'supportDiskintensive' => 'string', + 'supportHighperformance' => 'string', + 'supportKvm' => 'string', + 'supportKvmGpuType' => 'string', + 'supportKvmInfiniband' => 'string', + 'supportLargememory' => 'string', + 'supportXen' => 'string', + 'supportXenGpuType' => 'string', + 'supportXenHana' => 'string', + 'containerFormat' => 'string', + 'diskFormat' => 'string', + 'id' => 'string', + 'limit' => 'int', + 'marker' => 'string', + 'memberStatus' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'protected' => 'bool', + 'sortDir' => 'string', + 'sortKey' => 'string', + 'status' => 'string', + 'tag' => 'string', + 'visibility' => 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 镜像是否是受保护,取值为true/false。一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * osBit 操作系统位数,一般取值为32或者64 + * osType 镜像系统类型,取值为Linux,Windows,Other + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认返回25条镜像记录 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时,设置“visibility”参数为“shared” + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。取值为1~1024GB。取值为40~255GB + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,查询公共镜像时候取值为True,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询 + * visibility 是否被其他租户可见,取值如下: public:公共镜像 private:私有镜像 shared:共享镜像 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为 “ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imagetype' => null, + 'isregistered' => null, + 'osBit' => null, + 'osType' => null, + 'platform' => null, + 'supportDiskintensive' => null, + 'supportHighperformance' => null, + 'supportKvm' => null, + 'supportKvmGpuType' => null, + 'supportKvmInfiniband' => null, + 'supportLargememory' => null, + 'supportXen' => null, + 'supportXenGpuType' => null, + 'supportXenHana' => null, + 'containerFormat' => null, + 'diskFormat' => null, + 'id' => null, + 'limit' => 'int32', + 'marker' => null, + 'memberStatus' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'owner' => null, + 'protected' => null, + 'sortDir' => null, + 'sortKey' => null, + 'status' => null, + 'tag' => null, + 'visibility' => null, + 'createdAt' => null, + 'updatedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 镜像是否是受保护,取值为true/false。一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * osBit 操作系统位数,一般取值为32或者64 + * osType 镜像系统类型,取值为Linux,Windows,Other + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认返回25条镜像记录 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时,设置“visibility”参数为“shared” + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。取值为1~1024GB。取值为40~255GB + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,查询公共镜像时候取值为True,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询 + * visibility 是否被其他租户可见,取值如下: public:公共镜像 private:私有镜像 shared:共享镜像 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为 “ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $attributeMap = [ + 'imagetype' => '__imagetype', + 'isregistered' => '__isregistered', + 'osBit' => '__os_bit', + 'osType' => '__os_type', + 'platform' => '__platform', + 'supportDiskintensive' => '__support_diskintensive', + 'supportHighperformance' => '__support_highperformance', + 'supportKvm' => '__support_kvm', + 'supportKvmGpuType' => '__support_kvm_gpu_type', + 'supportKvmInfiniband' => '__support_kvm_infiniband', + 'supportLargememory' => '__support_largememory', + 'supportXen' => '__support_xen', + 'supportXenGpuType' => '__support_xen_gpu_type', + 'supportXenHana' => '__support_xen_hana', + 'containerFormat' => 'container_format', + 'diskFormat' => 'disk_format', + 'id' => 'id', + 'limit' => 'limit', + 'marker' => 'marker', + 'memberStatus' => 'member_status', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'owner' => 'owner', + 'protected' => 'protected', + 'sortDir' => 'sort_dir', + 'sortKey' => 'sort_key', + 'status' => 'status', + 'tag' => 'tag', + 'visibility' => 'visibility', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 镜像是否是受保护,取值为true/false。一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * osBit 操作系统位数,一般取值为32或者64 + * osType 镜像系统类型,取值为Linux,Windows,Other + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认返回25条镜像记录 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时,设置“visibility”参数为“shared” + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。取值为1~1024GB。取值为40~255GB + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,查询公共镜像时候取值为True,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询 + * visibility 是否被其他租户可见,取值如下: public:公共镜像 private:私有镜像 shared:共享镜像 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为 “ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $setters = [ + 'imagetype' => 'setImagetype', + 'isregistered' => 'setIsregistered', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType', + 'platform' => 'setPlatform', + 'supportDiskintensive' => 'setSupportDiskintensive', + 'supportHighperformance' => 'setSupportHighperformance', + 'supportKvm' => 'setSupportKvm', + 'supportKvmGpuType' => 'setSupportKvmGpuType', + 'supportKvmInfiniband' => 'setSupportKvmInfiniband', + 'supportLargememory' => 'setSupportLargememory', + 'supportXen' => 'setSupportXen', + 'supportXenGpuType' => 'setSupportXenGpuType', + 'supportXenHana' => 'setSupportXenHana', + 'containerFormat' => 'setContainerFormat', + 'diskFormat' => 'setDiskFormat', + 'id' => 'setId', + 'limit' => 'setLimit', + 'marker' => 'setMarker', + 'memberStatus' => 'setMemberStatus', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'owner' => 'setOwner', + 'protected' => 'setProtected', + 'sortDir' => 'setSortDir', + 'sortKey' => 'setSortKey', + 'status' => 'setStatus', + 'tag' => 'setTag', + 'visibility' => 'setVisibility', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 镜像是否是受保护,取值为true/false。一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * osBit 操作系统位数,一般取值为32或者64 + * osType 镜像系统类型,取值为Linux,Windows,Other + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认返回25条镜像记录 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时,设置“visibility”参数为“shared” + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。取值为1~1024GB。取值为40~255GB + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,查询公共镜像时候取值为True,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询 + * visibility 是否被其他租户可见,取值如下: public:公共镜像 private:私有镜像 shared:共享镜像 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为 “ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $getters = [ + 'imagetype' => 'getImagetype', + 'isregistered' => 'getIsregistered', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType', + 'platform' => 'getPlatform', + 'supportDiskintensive' => 'getSupportDiskintensive', + 'supportHighperformance' => 'getSupportHighperformance', + 'supportKvm' => 'getSupportKvm', + 'supportKvmGpuType' => 'getSupportKvmGpuType', + 'supportKvmInfiniband' => 'getSupportKvmInfiniband', + 'supportLargememory' => 'getSupportLargememory', + 'supportXen' => 'getSupportXen', + 'supportXenGpuType' => 'getSupportXenGpuType', + 'supportXenHana' => 'getSupportXenHana', + 'containerFormat' => 'getContainerFormat', + 'diskFormat' => 'getDiskFormat', + 'id' => 'getId', + 'limit' => 'getLimit', + 'marker' => 'getMarker', + 'memberStatus' => 'getMemberStatus', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'owner' => 'getOwner', + 'protected' => 'getProtected', + 'sortDir' => 'getSortDir', + 'sortKey' => 'getSortKey', + 'status' => 'getStatus', + 'tag' => 'getTag', + 'visibility' => 'getVisibility', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const IMAGETYPE_MARKET = 'market'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const PLATFORM_WINDOWS = 'Windows'; + const PLATFORM_UBUNTU = 'Ubuntu'; + const PLATFORM_RED_HAT = 'RedHat'; + const PLATFORM_SUSE = 'SUSE'; + const PLATFORM_CENT_OS = 'CentOS'; + const PLATFORM_DEBIAN = 'Debian'; + const PLATFORM_OPEN_SUSE = 'OpenSUSE'; + const PLATFORM_ORACLE_LINUX = 'Oracle Linux'; + const PLATFORM_FEDORA = 'Fedora'; + const PLATFORM_OTHER = 'Other'; + const PLATFORM_CORE_OS = 'CoreOS'; + const PLATFORM_EULER_OS = 'EulerOS'; + const DISK_FORMAT_VHD = 'vhd'; + const DISK_FORMAT_ZVHD = 'zvhd'; + const DISK_FORMAT_RAW = 'raw'; + const DISK_FORMAT_QCOW2 = 'qcow2'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const VISIBILITY__PUBLIC = 'public'; + const VISIBILITY__PRIVATE = 'private'; + const VISIBILITY_SHARED = 'shared'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + self::IMAGETYPE_MARKET, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_WINDOWS, + self::PLATFORM_UBUNTU, + self::PLATFORM_RED_HAT, + self::PLATFORM_SUSE, + self::PLATFORM_CENT_OS, + self::PLATFORM_DEBIAN, + self::PLATFORM_OPEN_SUSE, + self::PLATFORM_ORACLE_LINUX, + self::PLATFORM_FEDORA, + self::PLATFORM_OTHER, + self::PLATFORM_CORE_OS, + self::PLATFORM_EULER_OS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDiskFormatAllowableValues() + { + return [ + self::DISK_FORMAT_VHD, + self::DISK_FORMAT_ZVHD, + self::DISK_FORMAT_RAW, + self::DISK_FORMAT_QCOW2, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVisibilityAllowableValues() + { + return [ + self::VISIBILITY__PUBLIC, + self::VISIBILITY__PRIVATE, + self::VISIBILITY_SHARED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : true; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['supportDiskintensive'] = isset($data['supportDiskintensive']) ? $data['supportDiskintensive'] : null; + $this->container['supportHighperformance'] = isset($data['supportHighperformance']) ? $data['supportHighperformance'] : null; + $this->container['supportKvm'] = isset($data['supportKvm']) ? $data['supportKvm'] : null; + $this->container['supportKvmGpuType'] = isset($data['supportKvmGpuType']) ? $data['supportKvmGpuType'] : null; + $this->container['supportKvmInfiniband'] = isset($data['supportKvmInfiniband']) ? $data['supportKvmInfiniband'] : null; + $this->container['supportLargememory'] = isset($data['supportLargememory']) ? $data['supportLargememory'] : null; + $this->container['supportXen'] = isset($data['supportXen']) ? $data['supportXen'] : null; + $this->container['supportXenGpuType'] = isset($data['supportXenGpuType']) ? $data['supportXenGpuType'] : null; + $this->container['supportXenHana'] = isset($data['supportXenHana']) ? $data['supportXenHana'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : 'bare'; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 25; + $this->container['marker'] = isset($data['marker']) ? $data['marker'] : null; + $this->container['memberStatus'] = isset($data['memberStatus']) ? $data['memberStatus'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['sortDir'] = isset($data['sortDir']) ? $data['sortDir'] : null; + $this->container['sortKey'] = isset($data['sortKey']) ? $data['sortKey'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'platform', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDiskFormatAllowableValues(); + if (!is_null($this->container['diskFormat']) && !in_array($this->container['diskFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'diskFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] > 1024)) { + $invalidProperties[] = "invalid value for 'minDisk', must be smaller than or equal to 1024."; + } + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] < 1)) { + $invalidProperties[] = "invalid value for 'minDisk', must be bigger than or equal to 1."; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVisibilityAllowableValues(); + if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'visibility', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return string|null + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string|null $imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets isregistered + * 镜像是否是受保护,取值为true/false。一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * + * @return bool|null + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param bool|null $isregistered 镜像是否是受保护,取值为true/false。一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets osBit + * 操作系统位数,一般取值为32或者64 + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 操作系统位数,一般取值为32或者64 + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 镜像系统类型,取值为Linux,Windows,Other + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 镜像系统类型,取值为Linux,Windows,Other + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets platform + * 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets supportDiskintensive + * 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportDiskintensive() + { + return $this->container['supportDiskintensive']; + } + + /** + * Sets supportDiskintensive + * + * @param string|null $supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportDiskintensive($supportDiskintensive) + { + $this->container['supportDiskintensive'] = $supportDiskintensive; + return $this; + } + + /** + * Gets supportHighperformance + * 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportHighperformance() + { + return $this->container['supportHighperformance']; + } + + /** + * Sets supportHighperformance + * + * @param string|null $supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportHighperformance($supportHighperformance) + { + $this->container['supportHighperformance'] = $supportHighperformance; + return $this; + } + + /** + * Gets supportKvm + * 如果镜像支持KVM,取值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportKvm() + { + return $this->container['supportKvm']; + } + + /** + * Sets supportKvm + * + * @param string|null $supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportKvm($supportKvm) + { + $this->container['supportKvm'] = $supportKvm; + return $this; + } + + /** + * Gets supportKvmGpuType + * 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * + * @return string|null + */ + public function getSupportKvmGpuType() + { + return $this->container['supportKvmGpuType']; + } + + /** + * Sets supportKvmGpuType + * + * @param string|null $supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * + * @return $this + */ + public function setSupportKvmGpuType($supportKvmGpuType) + { + $this->container['supportKvmGpuType'] = $supportKvmGpuType; + return $this; + } + + /** + * Gets supportKvmInfiniband + * 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmInfiniband() + { + return $this->container['supportKvmInfiniband']; + } + + /** + * Sets supportKvmInfiniband + * + * @param string|null $supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return $this + */ + public function setSupportKvmInfiniband($supportKvmInfiniband) + { + $this->container['supportKvmInfiniband'] = $supportKvmInfiniband; + return $this; + } + + /** + * Gets supportLargememory + * 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportLargememory() + { + return $this->container['supportLargememory']; + } + + /** + * Sets supportLargememory + * + * @param string|null $supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportLargememory($supportLargememory) + { + $this->container['supportLargememory'] = $supportLargememory; + return $this; + } + + /** + * Gets supportXen + * 如果镜像支持XEN,取值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportXen() + { + return $this->container['supportXen']; + } + + /** + * Sets supportXen + * + * @param string|null $supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportXen($supportXen) + { + $this->container['supportXen'] = $supportXen; + return $this; + } + + /** + * Gets supportXenGpuType + * 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * + * @return string|null + */ + public function getSupportXenGpuType() + { + return $this->container['supportXenGpuType']; + } + + /** + * Sets supportXenGpuType + * + * @param string|null $supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * + * @return $this + */ + public function setSupportXenGpuType($supportXenGpuType) + { + $this->container['supportXenGpuType'] = $supportXenGpuType; + return $this; + } + + /** + * Gets supportXenHana + * 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * + * @return string|null + */ + public function getSupportXenHana() + { + return $this->container['supportXenHana']; + } + + /** + * Sets supportXenHana + * + * @param string|null $supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存 + * + * @return $this + */ + public function setSupportXenHana($supportXenHana) + { + $this->container['supportXenHana'] = $supportXenHana; + return $this; + } + + /** + * Gets containerFormat + * 容器类型 + * + * @return string|null + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string|null $containerFormat 容器类型 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets diskFormat + * 镜像格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets id + * 镜像ID + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 镜像ID + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets limit + * 用于分页,表示查询几条镜像记录,取值为整数,默认返回25条镜像记录 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 用于分页,表示查询几条镜像记录,取值为整数,默认返回25条镜像记录 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets marker + * 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * + * @return string|null + */ + public function getMarker() + { + return $this->container['marker']; + } + + /** + * Sets marker + * + * @param string|null $marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * + * @return $this + */ + public function setMarker($marker) + { + $this->container['marker'] = $marker; + return $this; + } + + /** + * Gets memberStatus + * 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时,设置“visibility”参数为“shared” + * + * @return string|null + */ + public function getMemberStatus() + { + return $this->container['memberStatus']; + } + + /** + * Sets memberStatus + * + * @param string|null $memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时,设置“visibility”参数为“shared” + * + * @return $this + */ + public function setMemberStatus($memberStatus) + { + $this->container['memberStatus'] = $memberStatus; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。取值为1~1024GB。取值为40~255GB + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。取值为1~1024GB。取值为40~255GB + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets owner + * 镜像属于哪个租户 + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner 镜像属于哪个租户 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets protected + * 镜像是否是受保护,查询公共镜像时候取值为True,查询私有镜像可以不指定。 + * + * @return bool|null + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool|null $protected 镜像是否是受保护,查询公共镜像时候取值为True,查询私有镜像可以不指定。 + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets sortDir + * 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc + * + * @return string|null + */ + public function getSortDir() + { + return $this->container['sortDir']; + } + + /** + * Sets sortDir + * + * @param string|null $sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc + * + * @return $this + */ + public function setSortDir($sortDir) + { + $this->container['sortDir'] = $sortDir; + return $this; + } + + /** + * Gets sortKey + * 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status,id,size字段,默认为创建时间。 + * + * @return string|null + */ + public function getSortKey() + { + return $this->container['sortKey']; + } + + /** + * Sets sortKey + * + * @param string|null $sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status,id,size字段,默认为创建时间。 + * + * @return $this + */ + public function setSortKey($sortKey) + { + $this->container['sortKey'] = $sortKey; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets tag + * 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询 + * + * @return string|null + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询 + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Gets visibility + * 是否被其他租户可见,取值如下: public:公共镜像 private:私有镜像 shared:共享镜像 + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string|null $visibility 是否被其他租户可见,取值如下: public:公共镜像 private:私有镜像 shared:共享镜像 + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets createdAt + * 镜像创建时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 镜像修改时间。支持按照时间点过滤查询,取值格式为 “ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为 “ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceListImagesResponse.php b/Services/Ims/V2/Model/GlanceListImagesResponse.php new file mode 100755 index 0000000..24618ab --- /dev/null +++ b/Services/Ims/V2/Model/GlanceListImagesResponse.php @@ -0,0 +1,371 @@ + 'string', + 'images' => '\G42Cloud\SDK\Ims\V2\Model\GlanceShowImageResponseBody[]', + 'schema' => 'string', + 'next' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * first 查询首页的URL。 + * images 资源类型。 + * schema 描述镜像列表模式的URL。 + * next 查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'first' => null, + 'images' => null, + 'schema' => null, + 'next' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * first 查询首页的URL。 + * images 资源类型。 + * schema 描述镜像列表模式的URL。 + * next 查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'first' => 'first', + 'images' => 'images', + 'schema' => 'schema', + 'next' => 'next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * first 查询首页的URL。 + * images 资源类型。 + * schema 描述镜像列表模式的URL。 + * next 查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * @var string[] + */ + protected static $setters = [ + 'first' => 'setFirst', + 'images' => 'setImages', + 'schema' => 'setSchema', + 'next' => 'setNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * first 查询首页的URL。 + * images 资源类型。 + * schema 描述镜像列表模式的URL。 + * next 查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * @var string[] + */ + protected static $getters = [ + 'first' => 'getFirst', + 'images' => 'getImages', + 'schema' => 'getSchema', + 'next' => 'getNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['first'] = isset($data['first']) ? $data['first'] : null; + $this->container['images'] = isset($data['images']) ? $data['images'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + $this->container['next'] = isset($data['next']) ? $data['next'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets first + * 查询首页的URL。 + * + * @return string|null + */ + public function getFirst() + { + return $this->container['first']; + } + + /** + * Sets first + * + * @param string|null $first 查询首页的URL。 + * + * @return $this + */ + public function setFirst($first) + { + $this->container['first'] = $first; + return $this; + } + + /** + * Gets images + * 资源类型。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\GlanceShowImageResponseBody[]|null + */ + public function getImages() + { + return $this->container['images']; + } + + /** + * Sets images + * + * @param \G42Cloud\SDK\Ims\V2\Model\GlanceShowImageResponseBody[]|null $images 资源类型。 + * + * @return $this + */ + public function setImages($images) + { + $this->container['images'] = $images; + return $this; + } + + /** + * Gets schema + * 描述镜像列表模式的URL。 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 描述镜像列表模式的URL。 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Gets next + * 查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * @return string|null + */ + public function getNext() + { + return $this->container['next']; + } + + /** + * Sets next + * + * @param string|null $next 查询下一页的URL。当查询镜像列表最后一页时,不存在next。 + * + * @return $this + */ + public function setNext($next) + { + $this->container['next'] = $next; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageMemberRequest.php b/Services/Ims/V2/Model/GlanceShowImageMemberRequest.php new file mode 100755 index 0000000..028c2de --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageMemberRequest.php @@ -0,0 +1,306 @@ + 'string', + 'memberId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'memberId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'memberId' => 'member_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'memberId' => 'setMemberId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像id + * memberId 成员id + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'memberId' => 'getMemberId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['memberId'] = isset($data['memberId']) ? $data['memberId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + if ($this->container['memberId'] === null) { + $invalidProperties[] = "'memberId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像id + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像id + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets memberId + * 成员id + * + * @return string + */ + public function getMemberId() + { + return $this->container['memberId']; + } + + /** + * Sets memberId + * + * @param string $memberId 成员id + * + * @return $this + */ + public function setMemberId($memberId) + { + $this->container['memberId'] = $memberId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageMemberResponse.php b/Services/Ims/V2/Model/GlanceShowImageMemberResponse.php new file mode 100755 index 0000000..6ba14ef --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageMemberResponse.php @@ -0,0 +1,441 @@ + 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string', + 'imageId' => 'string', + 'memberId' => 'string', + 'schema' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'createdAt' => null, + 'updatedAt' => null, + 'imageId' => null, + 'memberId' => null, + 'schema' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'imageId' => 'image_id', + 'memberId' => 'member_id', + 'schema' => 'schema' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', + 'imageId' => 'setImageId', + 'memberId' => 'setMemberId', + 'schema' => 'setSchema' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', + 'imageId' => 'getImageId', + 'memberId' => 'getMemberId', + 'schema' => 'getSchema' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['memberId'] = isset($data['memberId']) ? $data['memberId'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 共享状态 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 共享状态 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets createdAt + * 共享时间,格式为UTC时间 + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 共享时间,格式为UTC时间 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 更新时间,格式为UTC时间 + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 更新时间,格式为UTC时间 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string|null + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string|null $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets memberId + * 成员ID + * + * @return string|null + */ + public function getMemberId() + { + return $this->container['memberId']; + } + + /** + * Sets memberId + * + * @param string|null $memberId 成员ID + * + * @return $this + */ + public function setMemberId($memberId) + { + $this->container['memberId'] = $memberId; + return $this; + } + + /** + * Gets schema + * 共享视图 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 共享视图 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageMemberSchemasRequest.php b/Services/Ims/V2/Model/GlanceShowImageMemberSchemasRequest.php new file mode 100755 index 0000000..50dd893 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageMemberSchemasRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageMemberSchemasResponse.php b/Services/Ims/V2/Model/GlanceShowImageMemberSchemasResponse.php new file mode 100755 index 0000000..1e1ebbe --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageMemberSchemasResponse.php @@ -0,0 +1,301 @@ + 'string', + 'properties' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * name 视图名称。 + * properties 镜像成员属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'properties' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * name 视图名称。 + * properties 镜像成员属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'properties' => 'properties' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * name 视图名称。 + * properties 镜像成员属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'properties' => 'setProperties' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * name 视图名称。 + * properties 镜像成员属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'properties' => 'getProperties' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['properties'] = isset($data['properties']) ? $data['properties'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * 视图名称。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 视图名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets properties + * 镜像成员属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @return object|null + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param object|null $properties 镜像成员属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @return $this + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageRequest.php b/Services/Ims/V2/Model/GlanceShowImageRequest.php new file mode 100755 index 0000000..30685a0 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageResponse.php b/Services/Ims/V2/Model/GlanceShowImageResponse.php new file mode 100755 index 0000000..5293a58 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageResponse.php @@ -0,0 +1,2695 @@ + 'string', + 'dataOrigin' => 'string', + 'description' => 'string', + 'imageSize' => 'string', + 'imageSourceType' => 'string', + 'imagetype' => 'string', + 'isregistered' => 'string', + 'originalimagename' => 'string', + 'osBit' => 'string', + 'osType' => 'string', + 'osVersion' => 'string', + 'platform' => 'string', + 'productcode' => 'string', + 'supportDiskintensive' => 'string', + 'supportHighperformance' => 'string', + 'supportKvm' => 'string', + 'supportKvmGpuType' => 'string', + 'supportKvmInfiniband' => 'string', + 'supportLargememory' => 'string', + 'supportXen' => 'string', + 'supportXenGpuType' => 'string', + 'supportXenHana' => 'string', + 'checksum' => 'string', + 'containerFormat' => 'string', + 'createdAt' => 'string', + 'diskFormat' => 'string', + 'file' => 'string', + 'id' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'protected' => 'bool', + 'schema' => 'string', + 'self' => 'string', + 'size' => 'int', + 'status' => 'string', + 'tags' => 'string[]', + 'updatedAt' => 'string', + 'virtualEnvType' => 'string', + 'virtualSize' => 'int', + 'visibility' => 'string', + 'supportFcInject' => 'string', + 'enterpriseProjectId' => 'string', + 'hwFirmwareType' => 'string', + 'supportArm' => 'string', + 'isOffshelved' => 'string', + 'lazyloading' => 'string', + 'osFeatureList' => 'string', + 'rootOrigin' => 'string', + 'sequenceNum' => 'string', + 'supportAgentList' => 'string', + 'systemCmkid' => 'string', + 'activeAt' => 'string', + 'hwVifMultiqueueEnabled' => 'string', + 'maxRam' => 'string', + 'imageLocation' => 'string', + 'isConfigInit' => 'string', + 'accountCode' => 'string', + 'supportAmd' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'backupId' => null, + 'dataOrigin' => null, + 'description' => null, + 'imageSize' => null, + 'imageSourceType' => null, + 'imagetype' => null, + 'isregistered' => null, + 'originalimagename' => null, + 'osBit' => null, + 'osType' => null, + 'osVersion' => null, + 'platform' => null, + 'productcode' => null, + 'supportDiskintensive' => null, + 'supportHighperformance' => null, + 'supportKvm' => null, + 'supportKvmGpuType' => null, + 'supportKvmInfiniband' => null, + 'supportLargememory' => null, + 'supportXen' => null, + 'supportXenGpuType' => null, + 'supportXenHana' => null, + 'checksum' => null, + 'containerFormat' => null, + 'createdAt' => null, + 'diskFormat' => null, + 'file' => null, + 'id' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'owner' => null, + 'protected' => null, + 'schema' => null, + 'self' => null, + 'size' => 'int64', + 'status' => null, + 'tags' => null, + 'updatedAt' => null, + 'virtualEnvType' => null, + 'virtualSize' => 'int32', + 'visibility' => null, + 'supportFcInject' => null, + 'enterpriseProjectId' => null, + 'hwFirmwareType' => null, + 'supportArm' => null, + 'isOffshelved' => null, + 'lazyloading' => null, + 'osFeatureList' => null, + 'rootOrigin' => null, + 'sequenceNum' => null, + 'supportAgentList' => null, + 'systemCmkid' => null, + 'activeAt' => null, + 'hwVifMultiqueueEnabled' => null, + 'maxRam' => null, + 'imageLocation' => null, + 'isConfigInit' => null, + 'accountCode' => null, + 'supportAmd' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'backupId' => '__backup_id', + 'dataOrigin' => '__data_origin', + 'description' => '__description', + 'imageSize' => '__image_size', + 'imageSourceType' => '__image_source_type', + 'imagetype' => '__imagetype', + 'isregistered' => '__isregistered', + 'originalimagename' => '__originalimagename', + 'osBit' => '__os_bit', + 'osType' => '__os_type', + 'osVersion' => '__os_version', + 'platform' => '__platform', + 'productcode' => '__productcode', + 'supportDiskintensive' => '__support_diskintensive', + 'supportHighperformance' => '__support_highperformance', + 'supportKvm' => '__support_kvm', + 'supportKvmGpuType' => '__support_kvm_gpu_type', + 'supportKvmInfiniband' => '__support_kvm_infiniband', + 'supportLargememory' => '__support_largememory', + 'supportXen' => '__support_xen', + 'supportXenGpuType' => '__support_xen_gpu_type', + 'supportXenHana' => '__support_xen_hana', + 'checksum' => 'checksum', + 'containerFormat' => 'container_format', + 'createdAt' => 'created_at', + 'diskFormat' => 'disk_format', + 'file' => 'file', + 'id' => 'id', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'owner' => 'owner', + 'protected' => 'protected', + 'schema' => 'schema', + 'self' => 'self', + 'size' => 'size', + 'status' => 'status', + 'tags' => 'tags', + 'updatedAt' => 'updated_at', + 'virtualEnvType' => 'virtual_env_type', + 'virtualSize' => 'virtual_size', + 'visibility' => 'visibility', + 'supportFcInject' => '__support_fc_inject', + 'enterpriseProjectId' => 'enterprise_project_id', + 'hwFirmwareType' => 'hw_firmware_type', + 'supportArm' => '__support_arm', + 'isOffshelved' => '__is_offshelved', + 'lazyloading' => '__lazyloading', + 'osFeatureList' => '__os_feature_list', + 'rootOrigin' => '__root_origin', + 'sequenceNum' => '__sequence_num', + 'supportAgentList' => '__support_agent_list', + 'systemCmkid' => '__system__cmkid', + 'activeAt' => 'active_at', + 'hwVifMultiqueueEnabled' => 'hw_vif_multiqueue_enabled', + 'maxRam' => 'max_ram', + 'imageLocation' => '__image_location', + 'isConfigInit' => '__is_config_init', + 'accountCode' => '__account_code', + 'supportAmd' => '__support_amd' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $setters = [ + 'backupId' => 'setBackupId', + 'dataOrigin' => 'setDataOrigin', + 'description' => 'setDescription', + 'imageSize' => 'setImageSize', + 'imageSourceType' => 'setImageSourceType', + 'imagetype' => 'setImagetype', + 'isregistered' => 'setIsregistered', + 'originalimagename' => 'setOriginalimagename', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType', + 'osVersion' => 'setOsVersion', + 'platform' => 'setPlatform', + 'productcode' => 'setProductcode', + 'supportDiskintensive' => 'setSupportDiskintensive', + 'supportHighperformance' => 'setSupportHighperformance', + 'supportKvm' => 'setSupportKvm', + 'supportKvmGpuType' => 'setSupportKvmGpuType', + 'supportKvmInfiniband' => 'setSupportKvmInfiniband', + 'supportLargememory' => 'setSupportLargememory', + 'supportXen' => 'setSupportXen', + 'supportXenGpuType' => 'setSupportXenGpuType', + 'supportXenHana' => 'setSupportXenHana', + 'checksum' => 'setChecksum', + 'containerFormat' => 'setContainerFormat', + 'createdAt' => 'setCreatedAt', + 'diskFormat' => 'setDiskFormat', + 'file' => 'setFile', + 'id' => 'setId', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'owner' => 'setOwner', + 'protected' => 'setProtected', + 'schema' => 'setSchema', + 'self' => 'setSelf', + 'size' => 'setSize', + 'status' => 'setStatus', + 'tags' => 'setTags', + 'updatedAt' => 'setUpdatedAt', + 'virtualEnvType' => 'setVirtualEnvType', + 'virtualSize' => 'setVirtualSize', + 'visibility' => 'setVisibility', + 'supportFcInject' => 'setSupportFcInject', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'hwFirmwareType' => 'setHwFirmwareType', + 'supportArm' => 'setSupportArm', + 'isOffshelved' => 'setIsOffshelved', + 'lazyloading' => 'setLazyloading', + 'osFeatureList' => 'setOsFeatureList', + 'rootOrigin' => 'setRootOrigin', + 'sequenceNum' => 'setSequenceNum', + 'supportAgentList' => 'setSupportAgentList', + 'systemCmkid' => 'setSystemCmkid', + 'activeAt' => 'setActiveAt', + 'hwVifMultiqueueEnabled' => 'setHwVifMultiqueueEnabled', + 'maxRam' => 'setMaxRam', + 'imageLocation' => 'setImageLocation', + 'isConfigInit' => 'setIsConfigInit', + 'accountCode' => 'setAccountCode', + 'supportAmd' => 'setSupportAmd' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $getters = [ + 'backupId' => 'getBackupId', + 'dataOrigin' => 'getDataOrigin', + 'description' => 'getDescription', + 'imageSize' => 'getImageSize', + 'imageSourceType' => 'getImageSourceType', + 'imagetype' => 'getImagetype', + 'isregistered' => 'getIsregistered', + 'originalimagename' => 'getOriginalimagename', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType', + 'osVersion' => 'getOsVersion', + 'platform' => 'getPlatform', + 'productcode' => 'getProductcode', + 'supportDiskintensive' => 'getSupportDiskintensive', + 'supportHighperformance' => 'getSupportHighperformance', + 'supportKvm' => 'getSupportKvm', + 'supportKvmGpuType' => 'getSupportKvmGpuType', + 'supportKvmInfiniband' => 'getSupportKvmInfiniband', + 'supportLargememory' => 'getSupportLargememory', + 'supportXen' => 'getSupportXen', + 'supportXenGpuType' => 'getSupportXenGpuType', + 'supportXenHana' => 'getSupportXenHana', + 'checksum' => 'getChecksum', + 'containerFormat' => 'getContainerFormat', + 'createdAt' => 'getCreatedAt', + 'diskFormat' => 'getDiskFormat', + 'file' => 'getFile', + 'id' => 'getId', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'owner' => 'getOwner', + 'protected' => 'getProtected', + 'schema' => 'getSchema', + 'self' => 'getSelf', + 'size' => 'getSize', + 'status' => 'getStatus', + 'tags' => 'getTags', + 'updatedAt' => 'getUpdatedAt', + 'virtualEnvType' => 'getVirtualEnvType', + 'virtualSize' => 'getVirtualSize', + 'visibility' => 'getVisibility', + 'supportFcInject' => 'getSupportFcInject', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'hwFirmwareType' => 'getHwFirmwareType', + 'supportArm' => 'getSupportArm', + 'isOffshelved' => 'getIsOffshelved', + 'lazyloading' => 'getLazyloading', + 'osFeatureList' => 'getOsFeatureList', + 'rootOrigin' => 'getRootOrigin', + 'sequenceNum' => 'getSequenceNum', + 'supportAgentList' => 'getSupportAgentList', + 'systemCmkid' => 'getSystemCmkid', + 'activeAt' => 'getActiveAt', + 'hwVifMultiqueueEnabled' => 'getHwVifMultiqueueEnabled', + 'maxRam' => 'getMaxRam', + 'imageLocation' => 'getImageLocation', + 'isConfigInit' => 'getIsConfigInit', + 'accountCode' => 'getAccountCode', + 'supportAmd' => 'getSupportAmd' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGE_SOURCE_TYPE_UDS = 'uds'; + const IMAGE_SOURCE_TYPE_SWIFT = 'swift'; + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const IMAGETYPE_MARKET = 'market'; + const ISREGISTERED_TRUE = 'true'; + const ISREGISTERED_FALSE = 'false'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const PLATFORM_WINDOWS = 'Windows'; + const PLATFORM_UBUNTU = 'Ubuntu'; + const PLATFORM_RED_HAT = 'RedHat'; + const PLATFORM_SUSE = 'SUSE'; + const PLATFORM_CENT_OS = 'CentOS'; + const PLATFORM_DEBIAN = 'Debian'; + const PLATFORM_OPEN_SUSE = 'OpenSUSE'; + const PLATFORM_ORACLE_LINUX = 'OracleLinux'; + const PLATFORM_FEDORA = 'Fedora'; + const PLATFORM_OTHER = 'Other'; + const PLATFORM_CORE_OS = 'CoreOS'; + const PLATFORM_EULER_OS = 'EulerOS'; + const DISK_FORMAT_VHD = 'vhd'; + const DISK_FORMAT_ZVHD = 'zvhd'; + const DISK_FORMAT_RAW = 'raw'; + const DISK_FORMAT_QCOW2 = 'qcow2'; + const DISK_FORMAT_ZVHD2 = 'zvhd2'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + const VISIBILITY__PRIVATE = 'private'; + const VISIBILITY__PUBLIC = 'public'; + const VISIBILITY_SHARED = 'shared'; + const SUPPORT_FC_INJECT_TRUE = 'true'; + const SUPPORT_FC_INJECT_FALSE = 'false'; + const HW_FIRMWARE_TYPE_BIOS = 'bios'; + const HW_FIRMWARE_TYPE_UEFI = 'uefi'; + const SUPPORT_ARM_TRUE = 'true'; + const SUPPORT_ARM_FALSE = 'false'; + const IS_OFFSHELVED_TRUE = 'true'; + const IS_OFFSHELVED_FALSE = 'false'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImageSourceTypeAllowableValues() + { + return [ + self::IMAGE_SOURCE_TYPE_UDS, + self::IMAGE_SOURCE_TYPE_SWIFT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + self::IMAGETYPE_MARKET, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsregisteredAllowableValues() + { + return [ + self::ISREGISTERED_TRUE, + self::ISREGISTERED_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_WINDOWS, + self::PLATFORM_UBUNTU, + self::PLATFORM_RED_HAT, + self::PLATFORM_SUSE, + self::PLATFORM_CENT_OS, + self::PLATFORM_DEBIAN, + self::PLATFORM_OPEN_SUSE, + self::PLATFORM_ORACLE_LINUX, + self::PLATFORM_FEDORA, + self::PLATFORM_OTHER, + self::PLATFORM_CORE_OS, + self::PLATFORM_EULER_OS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDiskFormatAllowableValues() + { + return [ + self::DISK_FORMAT_VHD, + self::DISK_FORMAT_ZVHD, + self::DISK_FORMAT_RAW, + self::DISK_FORMAT_QCOW2, + self::DISK_FORMAT_ZVHD2, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVisibilityAllowableValues() + { + return [ + self::VISIBILITY__PRIVATE, + self::VISIBILITY__PUBLIC, + self::VISIBILITY_SHARED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportFcInjectAllowableValues() + { + return [ + self::SUPPORT_FC_INJECT_TRUE, + self::SUPPORT_FC_INJECT_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHwFirmwareTypeAllowableValues() + { + return [ + self::HW_FIRMWARE_TYPE_BIOS, + self::HW_FIRMWARE_TYPE_UEFI, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportArmAllowableValues() + { + return [ + self::SUPPORT_ARM_TRUE, + self::SUPPORT_ARM_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsOffshelvedAllowableValues() + { + return [ + self::IS_OFFSHELVED_TRUE, + self::IS_OFFSHELVED_FALSE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['backupId'] = isset($data['backupId']) ? $data['backupId'] : null; + $this->container['dataOrigin'] = isset($data['dataOrigin']) ? $data['dataOrigin'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['imageSize'] = isset($data['imageSize']) ? $data['imageSize'] : null; + $this->container['imageSourceType'] = isset($data['imageSourceType']) ? $data['imageSourceType'] : null; + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : null; + $this->container['originalimagename'] = isset($data['originalimagename']) ? $data['originalimagename'] : null; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['productcode'] = isset($data['productcode']) ? $data['productcode'] : null; + $this->container['supportDiskintensive'] = isset($data['supportDiskintensive']) ? $data['supportDiskintensive'] : null; + $this->container['supportHighperformance'] = isset($data['supportHighperformance']) ? $data['supportHighperformance'] : null; + $this->container['supportKvm'] = isset($data['supportKvm']) ? $data['supportKvm'] : null; + $this->container['supportKvmGpuType'] = isset($data['supportKvmGpuType']) ? $data['supportKvmGpuType'] : null; + $this->container['supportKvmInfiniband'] = isset($data['supportKvmInfiniband']) ? $data['supportKvmInfiniband'] : null; + $this->container['supportLargememory'] = isset($data['supportLargememory']) ? $data['supportLargememory'] : null; + $this->container['supportXen'] = isset($data['supportXen']) ? $data['supportXen'] : null; + $this->container['supportXenGpuType'] = isset($data['supportXenGpuType']) ? $data['supportXenGpuType'] : null; + $this->container['supportXenHana'] = isset($data['supportXenHana']) ? $data['supportXenHana'] : null; + $this->container['checksum'] = isset($data['checksum']) ? $data['checksum'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['file'] = isset($data['file']) ? $data['file'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + $this->container['self'] = isset($data['self']) ? $data['self'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['virtualSize'] = isset($data['virtualSize']) ? $data['virtualSize'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['supportFcInject'] = isset($data['supportFcInject']) ? $data['supportFcInject'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['hwFirmwareType'] = isset($data['hwFirmwareType']) ? $data['hwFirmwareType'] : null; + $this->container['supportArm'] = isset($data['supportArm']) ? $data['supportArm'] : null; + $this->container['isOffshelved'] = isset($data['isOffshelved']) ? $data['isOffshelved'] : null; + $this->container['lazyloading'] = isset($data['lazyloading']) ? $data['lazyloading'] : null; + $this->container['osFeatureList'] = isset($data['osFeatureList']) ? $data['osFeatureList'] : null; + $this->container['rootOrigin'] = isset($data['rootOrigin']) ? $data['rootOrigin'] : null; + $this->container['sequenceNum'] = isset($data['sequenceNum']) ? $data['sequenceNum'] : null; + $this->container['supportAgentList'] = isset($data['supportAgentList']) ? $data['supportAgentList'] : null; + $this->container['systemCmkid'] = isset($data['systemCmkid']) ? $data['systemCmkid'] : null; + $this->container['activeAt'] = isset($data['activeAt']) ? $data['activeAt'] : null; + $this->container['hwVifMultiqueueEnabled'] = isset($data['hwVifMultiqueueEnabled']) ? $data['hwVifMultiqueueEnabled'] : null; + $this->container['maxRam'] = isset($data['maxRam']) ? $data['maxRam'] : null; + $this->container['imageLocation'] = isset($data['imageLocation']) ? $data['imageLocation'] : null; + $this->container['isConfigInit'] = isset($data['isConfigInit']) ? $data['isConfigInit'] : null; + $this->container['accountCode'] = isset($data['accountCode']) ? $data['accountCode'] : null; + $this->container['supportAmd'] = isset($data['supportAmd']) ? $data['supportAmd'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getImageSourceTypeAllowableValues(); + if (!is_null($this->container['imageSourceType']) && !in_array($this->container['imageSourceType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imageSourceType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsregisteredAllowableValues(); + if (!is_null($this->container['isregistered']) && !in_array($this->container['isregistered'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isregistered', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'platform', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDiskFormatAllowableValues(); + if (!is_null($this->container['diskFormat']) && !in_array($this->container['diskFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'diskFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVisibilityAllowableValues(); + if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'visibility', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportFcInjectAllowableValues(); + if (!is_null($this->container['supportFcInject']) && !in_array($this->container['supportFcInject'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportFcInject', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getHwFirmwareTypeAllowableValues(); + if (!is_null($this->container['hwFirmwareType']) && !in_array($this->container['hwFirmwareType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'hwFirmwareType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportArmAllowableValues(); + if (!is_null($this->container['supportArm']) && !in_array($this->container['supportArm'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportArm', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsOffshelvedAllowableValues(); + if (!is_null($this->container['isOffshelved']) && !in_array($this->container['isOffshelved'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isOffshelved', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets backupId + * 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * + * @return string|null + */ + public function getBackupId() + { + return $this->container['backupId']; + } + + /** + * Sets backupId + * + * @param string|null $backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * + * @return $this + */ + public function setBackupId($backupId) + { + $this->container['backupId'] = $backupId; + return $this; + } + + /** + * Gets dataOrigin + * 镜像来源。公共镜像为空。 + * + * @return string|null + */ + public function getDataOrigin() + { + return $this->container['dataOrigin']; + } + + /** + * Sets dataOrigin + * + * @param string|null $dataOrigin 镜像来源。公共镜像为空。 + * + * @return $this + */ + public function setDataOrigin($dataOrigin) + { + $this->container['dataOrigin'] = $dataOrigin; + return $this; + } + + /** + * Gets description + * 镜像描述信息。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets imageSize + * 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * + * @return string|null + */ + public function getImageSize() + { + return $this->container['imageSize']; + } + + /** + * Sets imageSize + * + * @param string|null $imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * + * @return $this + */ + public function setImageSize($imageSize) + { + $this->container['imageSize'] = $imageSize; + return $this; + } + + /** + * Gets imageSourceType + * 镜像后端存储类型,目前只支持uds + * + * @return string|null + */ + public function getImageSourceType() + { + return $this->container['imageSourceType']; + } + + /** + * Sets imageSourceType + * + * @param string|null $imageSourceType 镜像后端存储类型,目前只支持uds + * + * @return $this + */ + public function setImageSourceType($imageSourceType) + { + $this->container['imageSourceType'] = $imageSourceType; + return $this; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return string|null + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string|null $imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets isregistered + * 是否是注册过的镜像,取值为“true”或者“false”。 + * + * @return string|null + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param string|null $isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets originalimagename + * 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * + * @return string|null + */ + public function getOriginalimagename() + { + return $this->container['originalimagename']; + } + + /** + * Sets originalimagename + * + * @param string|null $originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * + * @return $this + */ + public function setOriginalimagename($originalimagename) + { + $this->container['originalimagename'] = $originalimagename; + return $this; + } + + /** + * Gets osBit + * 操作系统位数,一般取值为“32”或者“64”。 + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 操作系统位数,一般取值为“32”或者“64”。 + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 操作系统类型,目前取值Linux, Windows,Other。 + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 操作系统类型,目前取值Linux, Windows,Other。 + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets osVersion + * 操作系统具体版本。 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 操作系统具体版本。 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets platform + * 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets productcode + * 市场镜像的产品ID。 + * + * @return string|null + */ + public function getProductcode() + { + return $this->container['productcode']; + } + + /** + * Sets productcode + * + * @param string|null $productcode 市场镜像的产品ID。 + * + * @return $this + */ + public function setProductcode($productcode) + { + $this->container['productcode'] = $productcode; + return $this; + } + + /** + * Gets supportDiskintensive + * 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportDiskintensive() + { + return $this->container['supportDiskintensive']; + } + + /** + * Sets supportDiskintensive + * + * @param string|null $supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportDiskintensive($supportDiskintensive) + { + $this->container['supportDiskintensive'] = $supportDiskintensive; + return $this; + } + + /** + * Gets supportHighperformance + * 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportHighperformance() + { + return $this->container['supportHighperformance']; + } + + /** + * Sets supportHighperformance + * + * @param string|null $supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportHighperformance($supportHighperformance) + { + $this->container['supportHighperformance'] = $supportHighperformance; + return $this; + } + + /** + * Gets supportKvm + * 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportKvm() + { + return $this->container['supportKvm']; + } + + /** + * Sets supportKvm + * + * @param string|null $supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportKvm($supportKvm) + { + $this->container['supportKvm'] = $supportKvm; + return $this; + } + + /** + * Gets supportKvmGpuType + * 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmGpuType() + { + return $this->container['supportKvmGpuType']; + } + + /** + * Sets supportKvmGpuType + * + * @param string|null $supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportKvmGpuType($supportKvmGpuType) + { + $this->container['supportKvmGpuType'] = $supportKvmGpuType; + return $this; + } + + /** + * Gets supportKvmInfiniband + * 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmInfiniband() + { + return $this->container['supportKvmInfiniband']; + } + + /** + * Sets supportKvmInfiniband + * + * @param string|null $supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return $this + */ + public function setSupportKvmInfiniband($supportKvmInfiniband) + { + $this->container['supportKvmInfiniband'] = $supportKvmInfiniband; + return $this; + } + + /** + * Gets supportLargememory + * 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportLargememory() + { + return $this->container['supportLargememory']; + } + + /** + * Sets supportLargememory + * + * @param string|null $supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportLargememory($supportLargememory) + { + $this->container['supportLargememory'] = $supportLargememory; + return $this; + } + + /** + * Gets supportXen + * 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportXen() + { + return $this->container['supportXen']; + } + + /** + * Sets supportXen + * + * @param string|null $supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportXen($supportXen) + { + $this->container['supportXen'] = $supportXen; + return $this; + } + + /** + * Gets supportXenGpuType + * 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenGpuType() + { + return $this->container['supportXenGpuType']; + } + + /** + * Sets supportXenGpuType + * + * @param string|null $supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenGpuType($supportXenGpuType) + { + $this->container['supportXenGpuType'] = $supportXenGpuType; + return $this; + } + + /** + * Gets supportXenHana + * 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenHana() + { + return $this->container['supportXenHana']; + } + + /** + * Sets supportXenHana + * + * @param string|null $supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenHana($supportXenHana) + { + $this->container['supportXenHana'] = $supportXenHana; + return $this; + } + + /** + * Gets checksum + * 目前暂时不使用。 + * + * @return string|null + */ + public function getChecksum() + { + return $this->container['checksum']; + } + + /** + * Sets checksum + * + * @param string|null $checksum 目前暂时不使用。 + * + * @return $this + */ + public function setChecksum($checksum) + { + $this->container['checksum'] = $checksum; + return $this; + } + + /** + * Gets containerFormat + * 容器类型。 + * + * @return string|null + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string|null $containerFormat 容器类型。 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets createdAt + * 创建时间。格式为UTC时间。 + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 创建时间。格式为UTC时间。 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets diskFormat + * 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets file + * 镜像文件下载和上传链接。 + * + * @return string|null + */ + public function getFile() + { + return $this->container['file']; + } + + /** + * Sets file + * + * @param string|null $file 镜像文件下载和上传链接。 + * + * @return $this + */ + public function setFile($file) + { + $this->container['file'] = $file; + return $this; + } + + /** + * Gets id + * 镜像ID。 + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 镜像ID。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘容量,单位为GB + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘容量,单位为GB + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行最小内存,单位为MB。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 镜像运行最小内存,单位为MB。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets owner + * 镜像属于哪个租户。 + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner 镜像属于哪个租户。 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets protected + * 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * + * @return bool|null + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool|null $protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets schema + * 镜像视图。 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 镜像视图。 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Gets self + * 镜像链接信息。 + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self 镜像链接信息。 + * + * @return $this + */ + public function setSelf($self) + { + $this->container['self'] = $self; + return $this; + } + + /** + * Gets size + * 目前暂时不使用。 + * + * @return int|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size 目前暂时不使用。 + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets tags + * 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets updatedAt + * 更新时间。格式为UTC时间。 + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 更新时间。格式为UTC时间。 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets virtualEnvType + * 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * + * @return string|null + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string|null $virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets virtualSize + * 目前暂时不使用。 + * + * @return int|null + */ + public function getVirtualSize() + { + return $this->container['virtualSize']; + } + + /** + * Sets virtualSize + * + * @param int|null $virtualSize 目前暂时不使用。 + * + * @return $this + */ + public function setVirtualSize($virtualSize) + { + $this->container['virtualSize'] = $virtualSize; + return $this; + } + + /** + * Gets visibility + * 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string|null $visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets supportFcInject + * 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return string|null + */ + public function getSupportFcInject() + { + return $this->container['supportFcInject']; + } + + /** + * Sets supportFcInject + * + * @param string|null $supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return $this + */ + public function setSupportFcInject($supportFcInject) + { + $this->container['supportFcInject'] = $supportFcInject; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets hwFirmwareType + * 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return string|null + */ + public function getHwFirmwareType() + { + return $this->container['hwFirmwareType']; + } + + /** + * Sets hwFirmwareType + * + * @param string|null $hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return $this + */ + public function setHwFirmwareType($hwFirmwareType) + { + $this->container['hwFirmwareType'] = $hwFirmwareType; + return $this; + } + + /** + * Gets supportArm + * 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportArm() + { + return $this->container['supportArm']; + } + + /** + * Sets supportArm + * + * @param string|null $supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportArm($supportArm) + { + $this->container['supportArm'] = $supportArm; + return $this; + } + + /** + * Gets isOffshelved + * 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * + * @return string|null + */ + public function getIsOffshelved() + { + return $this->container['isOffshelved']; + } + + /** + * Sets isOffshelved + * + * @param string|null $isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * + * @return $this + */ + public function setIsOffshelved($isOffshelved) + { + $this->container['isOffshelved'] = $isOffshelved; + return $this; + } + + /** + * Gets lazyloading + * 镜像是否支持延迟加载。取值为True或False。 + * + * @return string|null + */ + public function getLazyloading() + { + return $this->container['lazyloading']; + } + + /** + * Sets lazyloading + * + * @param string|null $lazyloading 镜像是否支持延迟加载。取值为True或False。 + * + * @return $this + */ + public function setLazyloading($lazyloading) + { + $this->container['lazyloading'] = $lazyloading; + return $this; + } + + /** + * Gets osFeatureList + * 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return string|null + */ + public function getOsFeatureList() + { + return $this->container['osFeatureList']; + } + + /** + * Sets osFeatureList + * + * @param string|null $osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return $this + */ + public function setOsFeatureList($osFeatureList) + { + $this->container['osFeatureList'] = $osFeatureList; + return $this; + } + + /** + * Gets rootOrigin + * 表示当前镜像来源是从外部导入。取值:file。 + * + * @return string|null + */ + public function getRootOrigin() + { + return $this->container['rootOrigin']; + } + + /** + * Sets rootOrigin + * + * @param string|null $rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * + * @return $this + */ + public function setRootOrigin($rootOrigin) + { + $this->container['rootOrigin'] = $rootOrigin; + return $this; + } + + /** + * Gets sequenceNum + * 目前暂时不用 + * + * @return string|null + */ + public function getSequenceNum() + { + return $this->container['sequenceNum']; + } + + /** + * Sets sequenceNum + * + * @param string|null $sequenceNum 目前暂时不用 + * + * @return $this + */ + public function setSequenceNum($sequenceNum) + { + $this->container['sequenceNum'] = $sequenceNum; + return $this; + } + + /** + * Gets supportAgentList + * 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return string|null + */ + public function getSupportAgentList() + { + return $this->container['supportAgentList']; + } + + /** + * Sets supportAgentList + * + * @param string|null $supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return $this + */ + public function setSupportAgentList($supportAgentList) + { + $this->container['supportAgentList'] = $supportAgentList; + return $this; + } + + /** + * Gets systemCmkid + * 加密镜像所使用的密钥ID。 + * + * @return string|null + */ + public function getSystemCmkid() + { + return $this->container['systemCmkid']; + } + + /** + * Sets systemCmkid + * + * @param string|null $systemCmkid 加密镜像所使用的密钥ID。 + * + * @return $this + */ + public function setSystemCmkid($systemCmkid) + { + $this->container['systemCmkid'] = $systemCmkid; + return $this; + } + + /** + * Gets activeAt + * 镜像状态变为正常的时间。 + * + * @return string|null + */ + public function getActiveAt() + { + return $this->container['activeAt']; + } + + /** + * Sets activeAt + * + * @param string|null $activeAt 镜像状态变为正常的时间。 + * + * @return $this + */ + public function setActiveAt($activeAt) + { + $this->container['activeAt'] = $activeAt; + return $this; + } + + /** + * Gets hwVifMultiqueueEnabled + * 镜像是否支持网卡多队列。取值为true或者false。 + * + * @return string|null + */ + public function getHwVifMultiqueueEnabled() + { + return $this->container['hwVifMultiqueueEnabled']; + } + + /** + * Sets hwVifMultiqueueEnabled + * + * @param string|null $hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * + * @return $this + */ + public function setHwVifMultiqueueEnabled($hwVifMultiqueueEnabled) + { + $this->container['hwVifMultiqueueEnabled'] = $hwVifMultiqueueEnabled; + return $this; + } + + /** + * Gets maxRam + * 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return string|null + */ + public function getMaxRam() + { + return $this->container['maxRam']; + } + + /** + * Sets maxRam + * + * @param string|null $maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return $this + */ + public function setMaxRam($maxRam) + { + $this->container['maxRam'] = $maxRam; + return $this; + } + + /** + * Gets imageLocation + * 镜像的存储位置。 + * + * @return string|null + */ + public function getImageLocation() + { + return $this->container['imageLocation']; + } + + /** + * Sets imageLocation + * + * @param string|null $imageLocation 镜像的存储位置。 + * + * @return $this + */ + public function setImageLocation($imageLocation) + { + $this->container['imageLocation'] = $imageLocation; + return $this; + } + + /** + * Gets isConfigInit + * 是否完成了初始化配置。取值为true或false + * + * @return string|null + */ + public function getIsConfigInit() + { + return $this->container['isConfigInit']; + } + + /** + * Sets isConfigInit + * + * @param string|null $isConfigInit 是否完成了初始化配置。取值为true或false + * + * @return $this + */ + public function setIsConfigInit($isConfigInit) + { + $this->container['isConfigInit'] = $isConfigInit; + return $this; + } + + /** + * Gets accountCode + * 收费镜像标识。 + * + * @return string|null + */ + public function getAccountCode() + { + return $this->container['accountCode']; + } + + /** + * Sets accountCode + * + * @param string|null $accountCode 收费镜像标识。 + * + * @return $this + */ + public function setAccountCode($accountCode) + { + $this->container['accountCode'] = $accountCode; + return $this; + } + + /** + * Gets supportAmd + * 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportAmd() + { + return $this->container['supportAmd']; + } + + /** + * Sets supportAmd + * + * @param string|null $supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportAmd($supportAmd) + { + $this->container['supportAmd'] = $supportAmd; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageResponseBody.php b/Services/Ims/V2/Model/GlanceShowImageResponseBody.php new file mode 100755 index 0000000..31900c0 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageResponseBody.php @@ -0,0 +1,2760 @@ + 'string', + 'dataOrigin' => 'string', + 'description' => 'string', + 'imageSize' => 'string', + 'imageSourceType' => 'string', + 'imagetype' => 'string', + 'isregistered' => 'string', + 'originalimagename' => 'string', + 'osBit' => 'string', + 'osType' => 'string', + 'osVersion' => 'string', + 'platform' => 'string', + 'productcode' => 'string', + 'supportDiskintensive' => 'string', + 'supportHighperformance' => 'string', + 'supportKvm' => 'string', + 'supportKvmGpuType' => 'string', + 'supportKvmInfiniband' => 'string', + 'supportLargememory' => 'string', + 'supportXen' => 'string', + 'supportXenGpuType' => 'string', + 'supportXenHana' => 'string', + 'checksum' => 'string', + 'containerFormat' => 'string', + 'createdAt' => 'string', + 'diskFormat' => 'string', + 'file' => 'string', + 'id' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'protected' => 'bool', + 'schema' => 'string', + 'self' => 'string', + 'size' => 'int', + 'status' => 'string', + 'tags' => 'string[]', + 'updatedAt' => 'string', + 'virtualEnvType' => 'string', + 'virtualSize' => 'int', + 'visibility' => 'string', + 'supportFcInject' => 'string', + 'enterpriseProjectId' => 'string', + 'hwFirmwareType' => 'string', + 'supportArm' => 'string', + 'isOffshelved' => 'string', + 'lazyloading' => 'string', + 'osFeatureList' => 'string', + 'rootOrigin' => 'string', + 'sequenceNum' => 'string', + 'supportAgentList' => 'string', + 'systemCmkid' => 'string', + 'activeAt' => 'string', + 'hwVifMultiqueueEnabled' => 'string', + 'maxRam' => 'string', + 'imageLocation' => 'string', + 'isConfigInit' => 'string', + 'accountCode' => 'string', + 'supportAmd' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'backupId' => null, + 'dataOrigin' => null, + 'description' => null, + 'imageSize' => null, + 'imageSourceType' => null, + 'imagetype' => null, + 'isregistered' => null, + 'originalimagename' => null, + 'osBit' => null, + 'osType' => null, + 'osVersion' => null, + 'platform' => null, + 'productcode' => null, + 'supportDiskintensive' => null, + 'supportHighperformance' => null, + 'supportKvm' => null, + 'supportKvmGpuType' => null, + 'supportKvmInfiniband' => null, + 'supportLargememory' => null, + 'supportXen' => null, + 'supportXenGpuType' => null, + 'supportXenHana' => null, + 'checksum' => null, + 'containerFormat' => null, + 'createdAt' => null, + 'diskFormat' => null, + 'file' => null, + 'id' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'owner' => null, + 'protected' => null, + 'schema' => null, + 'self' => null, + 'size' => 'int64', + 'status' => null, + 'tags' => null, + 'updatedAt' => null, + 'virtualEnvType' => null, + 'virtualSize' => 'int32', + 'visibility' => null, + 'supportFcInject' => null, + 'enterpriseProjectId' => null, + 'hwFirmwareType' => null, + 'supportArm' => null, + 'isOffshelved' => null, + 'lazyloading' => null, + 'osFeatureList' => null, + 'rootOrigin' => null, + 'sequenceNum' => null, + 'supportAgentList' => null, + 'systemCmkid' => null, + 'activeAt' => null, + 'hwVifMultiqueueEnabled' => null, + 'maxRam' => null, + 'imageLocation' => null, + 'isConfigInit' => null, + 'accountCode' => null, + 'supportAmd' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'backupId' => '__backup_id', + 'dataOrigin' => '__data_origin', + 'description' => '__description', + 'imageSize' => '__image_size', + 'imageSourceType' => '__image_source_type', + 'imagetype' => '__imagetype', + 'isregistered' => '__isregistered', + 'originalimagename' => '__originalimagename', + 'osBit' => '__os_bit', + 'osType' => '__os_type', + 'osVersion' => '__os_version', + 'platform' => '__platform', + 'productcode' => '__productcode', + 'supportDiskintensive' => '__support_diskintensive', + 'supportHighperformance' => '__support_highperformance', + 'supportKvm' => '__support_kvm', + 'supportKvmGpuType' => '__support_kvm_gpu_type', + 'supportKvmInfiniband' => '__support_kvm_infiniband', + 'supportLargememory' => '__support_largememory', + 'supportXen' => '__support_xen', + 'supportXenGpuType' => '__support_xen_gpu_type', + 'supportXenHana' => '__support_xen_hana', + 'checksum' => 'checksum', + 'containerFormat' => 'container_format', + 'createdAt' => 'created_at', + 'diskFormat' => 'disk_format', + 'file' => 'file', + 'id' => 'id', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'owner' => 'owner', + 'protected' => 'protected', + 'schema' => 'schema', + 'self' => 'self', + 'size' => 'size', + 'status' => 'status', + 'tags' => 'tags', + 'updatedAt' => 'updated_at', + 'virtualEnvType' => 'virtual_env_type', + 'virtualSize' => 'virtual_size', + 'visibility' => 'visibility', + 'supportFcInject' => '__support_fc_inject', + 'enterpriseProjectId' => 'enterprise_project_id', + 'hwFirmwareType' => 'hw_firmware_type', + 'supportArm' => '__support_arm', + 'isOffshelved' => '__is_offshelved', + 'lazyloading' => '__lazyloading', + 'osFeatureList' => '__os_feature_list', + 'rootOrigin' => '__root_origin', + 'sequenceNum' => '__sequence_num', + 'supportAgentList' => '__support_agent_list', + 'systemCmkid' => '__system__cmkid', + 'activeAt' => 'active_at', + 'hwVifMultiqueueEnabled' => 'hw_vif_multiqueue_enabled', + 'maxRam' => 'max_ram', + 'imageLocation' => '__image_location', + 'isConfigInit' => '__is_config_init', + 'accountCode' => '__account_code', + 'supportAmd' => '__support_amd' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $setters = [ + 'backupId' => 'setBackupId', + 'dataOrigin' => 'setDataOrigin', + 'description' => 'setDescription', + 'imageSize' => 'setImageSize', + 'imageSourceType' => 'setImageSourceType', + 'imagetype' => 'setImagetype', + 'isregistered' => 'setIsregistered', + 'originalimagename' => 'setOriginalimagename', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType', + 'osVersion' => 'setOsVersion', + 'platform' => 'setPlatform', + 'productcode' => 'setProductcode', + 'supportDiskintensive' => 'setSupportDiskintensive', + 'supportHighperformance' => 'setSupportHighperformance', + 'supportKvm' => 'setSupportKvm', + 'supportKvmGpuType' => 'setSupportKvmGpuType', + 'supportKvmInfiniband' => 'setSupportKvmInfiniband', + 'supportLargememory' => 'setSupportLargememory', + 'supportXen' => 'setSupportXen', + 'supportXenGpuType' => 'setSupportXenGpuType', + 'supportXenHana' => 'setSupportXenHana', + 'checksum' => 'setChecksum', + 'containerFormat' => 'setContainerFormat', + 'createdAt' => 'setCreatedAt', + 'diskFormat' => 'setDiskFormat', + 'file' => 'setFile', + 'id' => 'setId', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'owner' => 'setOwner', + 'protected' => 'setProtected', + 'schema' => 'setSchema', + 'self' => 'setSelf', + 'size' => 'setSize', + 'status' => 'setStatus', + 'tags' => 'setTags', + 'updatedAt' => 'setUpdatedAt', + 'virtualEnvType' => 'setVirtualEnvType', + 'virtualSize' => 'setVirtualSize', + 'visibility' => 'setVisibility', + 'supportFcInject' => 'setSupportFcInject', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'hwFirmwareType' => 'setHwFirmwareType', + 'supportArm' => 'setSupportArm', + 'isOffshelved' => 'setIsOffshelved', + 'lazyloading' => 'setLazyloading', + 'osFeatureList' => 'setOsFeatureList', + 'rootOrigin' => 'setRootOrigin', + 'sequenceNum' => 'setSequenceNum', + 'supportAgentList' => 'setSupportAgentList', + 'systemCmkid' => 'setSystemCmkid', + 'activeAt' => 'setActiveAt', + 'hwVifMultiqueueEnabled' => 'setHwVifMultiqueueEnabled', + 'maxRam' => 'setMaxRam', + 'imageLocation' => 'setImageLocation', + 'isConfigInit' => 'setIsConfigInit', + 'accountCode' => 'setAccountCode', + 'supportAmd' => 'setSupportAmd' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $getters = [ + 'backupId' => 'getBackupId', + 'dataOrigin' => 'getDataOrigin', + 'description' => 'getDescription', + 'imageSize' => 'getImageSize', + 'imageSourceType' => 'getImageSourceType', + 'imagetype' => 'getImagetype', + 'isregistered' => 'getIsregistered', + 'originalimagename' => 'getOriginalimagename', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType', + 'osVersion' => 'getOsVersion', + 'platform' => 'getPlatform', + 'productcode' => 'getProductcode', + 'supportDiskintensive' => 'getSupportDiskintensive', + 'supportHighperformance' => 'getSupportHighperformance', + 'supportKvm' => 'getSupportKvm', + 'supportKvmGpuType' => 'getSupportKvmGpuType', + 'supportKvmInfiniband' => 'getSupportKvmInfiniband', + 'supportLargememory' => 'getSupportLargememory', + 'supportXen' => 'getSupportXen', + 'supportXenGpuType' => 'getSupportXenGpuType', + 'supportXenHana' => 'getSupportXenHana', + 'checksum' => 'getChecksum', + 'containerFormat' => 'getContainerFormat', + 'createdAt' => 'getCreatedAt', + 'diskFormat' => 'getDiskFormat', + 'file' => 'getFile', + 'id' => 'getId', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'owner' => 'getOwner', + 'protected' => 'getProtected', + 'schema' => 'getSchema', + 'self' => 'getSelf', + 'size' => 'getSize', + 'status' => 'getStatus', + 'tags' => 'getTags', + 'updatedAt' => 'getUpdatedAt', + 'virtualEnvType' => 'getVirtualEnvType', + 'virtualSize' => 'getVirtualSize', + 'visibility' => 'getVisibility', + 'supportFcInject' => 'getSupportFcInject', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'hwFirmwareType' => 'getHwFirmwareType', + 'supportArm' => 'getSupportArm', + 'isOffshelved' => 'getIsOffshelved', + 'lazyloading' => 'getLazyloading', + 'osFeatureList' => 'getOsFeatureList', + 'rootOrigin' => 'getRootOrigin', + 'sequenceNum' => 'getSequenceNum', + 'supportAgentList' => 'getSupportAgentList', + 'systemCmkid' => 'getSystemCmkid', + 'activeAt' => 'getActiveAt', + 'hwVifMultiqueueEnabled' => 'getHwVifMultiqueueEnabled', + 'maxRam' => 'getMaxRam', + 'imageLocation' => 'getImageLocation', + 'isConfigInit' => 'getIsConfigInit', + 'accountCode' => 'getAccountCode', + 'supportAmd' => 'getSupportAmd' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGE_SOURCE_TYPE_UDS = 'uds'; + const IMAGE_SOURCE_TYPE_SWIFT = 'swift'; + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const IMAGETYPE_MARKET = 'market'; + const ISREGISTERED_TRUE = 'true'; + const ISREGISTERED_FALSE = 'false'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const PLATFORM_WINDOWS = 'Windows'; + const PLATFORM_UBUNTU = 'Ubuntu'; + const PLATFORM_RED_HAT = 'RedHat'; + const PLATFORM_SUSE = 'SUSE'; + const PLATFORM_CENT_OS = 'CentOS'; + const PLATFORM_DEBIAN = 'Debian'; + const PLATFORM_OPEN_SUSE = 'OpenSUSE'; + const PLATFORM_ORACLE_LINUX = 'OracleLinux'; + const PLATFORM_FEDORA = 'Fedora'; + const PLATFORM_OTHER = 'Other'; + const PLATFORM_CORE_OS = 'CoreOS'; + const PLATFORM_EULER_OS = 'EulerOS'; + const DISK_FORMAT_VHD = 'vhd'; + const DISK_FORMAT_ZVHD = 'zvhd'; + const DISK_FORMAT_RAW = 'raw'; + const DISK_FORMAT_QCOW2 = 'qcow2'; + const DISK_FORMAT_ZVHD2 = 'zvhd2'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + const VISIBILITY__PRIVATE = 'private'; + const VISIBILITY__PUBLIC = 'public'; + const VISIBILITY_SHARED = 'shared'; + const SUPPORT_FC_INJECT_TRUE = 'true'; + const SUPPORT_FC_INJECT_FALSE = 'false'; + const HW_FIRMWARE_TYPE_BIOS = 'bios'; + const HW_FIRMWARE_TYPE_UEFI = 'uefi'; + const SUPPORT_ARM_TRUE = 'true'; + const SUPPORT_ARM_FALSE = 'false'; + const IS_OFFSHELVED_TRUE = 'true'; + const IS_OFFSHELVED_FALSE = 'false'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImageSourceTypeAllowableValues() + { + return [ + self::IMAGE_SOURCE_TYPE_UDS, + self::IMAGE_SOURCE_TYPE_SWIFT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + self::IMAGETYPE_MARKET, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsregisteredAllowableValues() + { + return [ + self::ISREGISTERED_TRUE, + self::ISREGISTERED_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_WINDOWS, + self::PLATFORM_UBUNTU, + self::PLATFORM_RED_HAT, + self::PLATFORM_SUSE, + self::PLATFORM_CENT_OS, + self::PLATFORM_DEBIAN, + self::PLATFORM_OPEN_SUSE, + self::PLATFORM_ORACLE_LINUX, + self::PLATFORM_FEDORA, + self::PLATFORM_OTHER, + self::PLATFORM_CORE_OS, + self::PLATFORM_EULER_OS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDiskFormatAllowableValues() + { + return [ + self::DISK_FORMAT_VHD, + self::DISK_FORMAT_ZVHD, + self::DISK_FORMAT_RAW, + self::DISK_FORMAT_QCOW2, + self::DISK_FORMAT_ZVHD2, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVisibilityAllowableValues() + { + return [ + self::VISIBILITY__PRIVATE, + self::VISIBILITY__PUBLIC, + self::VISIBILITY_SHARED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportFcInjectAllowableValues() + { + return [ + self::SUPPORT_FC_INJECT_TRUE, + self::SUPPORT_FC_INJECT_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHwFirmwareTypeAllowableValues() + { + return [ + self::HW_FIRMWARE_TYPE_BIOS, + self::HW_FIRMWARE_TYPE_UEFI, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportArmAllowableValues() + { + return [ + self::SUPPORT_ARM_TRUE, + self::SUPPORT_ARM_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsOffshelvedAllowableValues() + { + return [ + self::IS_OFFSHELVED_TRUE, + self::IS_OFFSHELVED_FALSE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['backupId'] = isset($data['backupId']) ? $data['backupId'] : null; + $this->container['dataOrigin'] = isset($data['dataOrigin']) ? $data['dataOrigin'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['imageSize'] = isset($data['imageSize']) ? $data['imageSize'] : null; + $this->container['imageSourceType'] = isset($data['imageSourceType']) ? $data['imageSourceType'] : null; + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : null; + $this->container['originalimagename'] = isset($data['originalimagename']) ? $data['originalimagename'] : null; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['productcode'] = isset($data['productcode']) ? $data['productcode'] : null; + $this->container['supportDiskintensive'] = isset($data['supportDiskintensive']) ? $data['supportDiskintensive'] : null; + $this->container['supportHighperformance'] = isset($data['supportHighperformance']) ? $data['supportHighperformance'] : null; + $this->container['supportKvm'] = isset($data['supportKvm']) ? $data['supportKvm'] : null; + $this->container['supportKvmGpuType'] = isset($data['supportKvmGpuType']) ? $data['supportKvmGpuType'] : null; + $this->container['supportKvmInfiniband'] = isset($data['supportKvmInfiniband']) ? $data['supportKvmInfiniband'] : null; + $this->container['supportLargememory'] = isset($data['supportLargememory']) ? $data['supportLargememory'] : null; + $this->container['supportXen'] = isset($data['supportXen']) ? $data['supportXen'] : null; + $this->container['supportXenGpuType'] = isset($data['supportXenGpuType']) ? $data['supportXenGpuType'] : null; + $this->container['supportXenHana'] = isset($data['supportXenHana']) ? $data['supportXenHana'] : null; + $this->container['checksum'] = isset($data['checksum']) ? $data['checksum'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['file'] = isset($data['file']) ? $data['file'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + $this->container['self'] = isset($data['self']) ? $data['self'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['virtualSize'] = isset($data['virtualSize']) ? $data['virtualSize'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['supportFcInject'] = isset($data['supportFcInject']) ? $data['supportFcInject'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['hwFirmwareType'] = isset($data['hwFirmwareType']) ? $data['hwFirmwareType'] : null; + $this->container['supportArm'] = isset($data['supportArm']) ? $data['supportArm'] : null; + $this->container['isOffshelved'] = isset($data['isOffshelved']) ? $data['isOffshelved'] : null; + $this->container['lazyloading'] = isset($data['lazyloading']) ? $data['lazyloading'] : null; + $this->container['osFeatureList'] = isset($data['osFeatureList']) ? $data['osFeatureList'] : null; + $this->container['rootOrigin'] = isset($data['rootOrigin']) ? $data['rootOrigin'] : null; + $this->container['sequenceNum'] = isset($data['sequenceNum']) ? $data['sequenceNum'] : null; + $this->container['supportAgentList'] = isset($data['supportAgentList']) ? $data['supportAgentList'] : null; + $this->container['systemCmkid'] = isset($data['systemCmkid']) ? $data['systemCmkid'] : null; + $this->container['activeAt'] = isset($data['activeAt']) ? $data['activeAt'] : null; + $this->container['hwVifMultiqueueEnabled'] = isset($data['hwVifMultiqueueEnabled']) ? $data['hwVifMultiqueueEnabled'] : null; + $this->container['maxRam'] = isset($data['maxRam']) ? $data['maxRam'] : null; + $this->container['imageLocation'] = isset($data['imageLocation']) ? $data['imageLocation'] : null; + $this->container['isConfigInit'] = isset($data['isConfigInit']) ? $data['isConfigInit'] : null; + $this->container['accountCode'] = isset($data['accountCode']) ? $data['accountCode'] : null; + $this->container['supportAmd'] = isset($data['supportAmd']) ? $data['supportAmd'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageSize'] === null) { + $invalidProperties[] = "'imageSize' can't be null"; + } + if ($this->container['imageSourceType'] === null) { + $invalidProperties[] = "'imageSourceType' can't be null"; + } + $allowedValues = $this->getImageSourceTypeAllowableValues(); + if (!is_null($this->container['imageSourceType']) && !in_array($this->container['imageSourceType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imageSourceType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['imagetype'] === null) { + $invalidProperties[] = "'imagetype' can't be null"; + } + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['isregistered'] === null) { + $invalidProperties[] = "'isregistered' can't be null"; + } + $allowedValues = $this->getIsregisteredAllowableValues(); + if (!is_null($this->container['isregistered']) && !in_array($this->container['isregistered'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isregistered', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['osType'] === null) { + $invalidProperties[] = "'osType' can't be null"; + } + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'platform', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['containerFormat'] === null) { + $invalidProperties[] = "'containerFormat' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['diskFormat'] === null) { + $invalidProperties[] = "'diskFormat' can't be null"; + } + $allowedValues = $this->getDiskFormatAllowableValues(); + if (!is_null($this->container['diskFormat']) && !in_array($this->container['diskFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'diskFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['file'] === null) { + $invalidProperties[] = "'file' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['minDisk'] === null) { + $invalidProperties[] = "'minDisk' can't be null"; + } + if ($this->container['minRam'] === null) { + $invalidProperties[] = "'minRam' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + if ($this->container['protected'] === null) { + $invalidProperties[] = "'protected' can't be null"; + } + if ($this->container['schema'] === null) { + $invalidProperties[] = "'schema' can't be null"; + } + if ($this->container['self'] === null) { + $invalidProperties[] = "'self' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } + if ($this->container['virtualEnvType'] === null) { + $invalidProperties[] = "'virtualEnvType' can't be null"; + } + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['visibility'] === null) { + $invalidProperties[] = "'visibility' can't be null"; + } + $allowedValues = $this->getVisibilityAllowableValues(); + if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'visibility', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportFcInjectAllowableValues(); + if (!is_null($this->container['supportFcInject']) && !in_array($this->container['supportFcInject'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportFcInject', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getHwFirmwareTypeAllowableValues(); + if (!is_null($this->container['hwFirmwareType']) && !in_array($this->container['hwFirmwareType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'hwFirmwareType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportArmAllowableValues(); + if (!is_null($this->container['supportArm']) && !in_array($this->container['supportArm'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportArm', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsOffshelvedAllowableValues(); + if (!is_null($this->container['isOffshelved']) && !in_array($this->container['isOffshelved'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isOffshelved', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets backupId + * 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * + * @return string|null + */ + public function getBackupId() + { + return $this->container['backupId']; + } + + /** + * Sets backupId + * + * @param string|null $backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * + * @return $this + */ + public function setBackupId($backupId) + { + $this->container['backupId'] = $backupId; + return $this; + } + + /** + * Gets dataOrigin + * 镜像来源。公共镜像为空。 + * + * @return string|null + */ + public function getDataOrigin() + { + return $this->container['dataOrigin']; + } + + /** + * Sets dataOrigin + * + * @param string|null $dataOrigin 镜像来源。公共镜像为空。 + * + * @return $this + */ + public function setDataOrigin($dataOrigin) + { + $this->container['dataOrigin'] = $dataOrigin; + return $this; + } + + /** + * Gets description + * 镜像描述信息。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets imageSize + * 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * + * @return string + */ + public function getImageSize() + { + return $this->container['imageSize']; + } + + /** + * Sets imageSize + * + * @param string $imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * + * @return $this + */ + public function setImageSize($imageSize) + { + $this->container['imageSize'] = $imageSize; + return $this; + } + + /** + * Gets imageSourceType + * 镜像后端存储类型,目前只支持uds + * + * @return string + */ + public function getImageSourceType() + { + return $this->container['imageSourceType']; + } + + /** + * Sets imageSourceType + * + * @param string $imageSourceType 镜像后端存储类型,目前只支持uds + * + * @return $this + */ + public function setImageSourceType($imageSourceType) + { + $this->container['imageSourceType'] = $imageSourceType; + return $this; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return string + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string $imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets isregistered + * 是否是注册过的镜像,取值为“true”或者“false”。 + * + * @return string + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param string $isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets originalimagename + * 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * + * @return string|null + */ + public function getOriginalimagename() + { + return $this->container['originalimagename']; + } + + /** + * Sets originalimagename + * + * @param string|null $originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * + * @return $this + */ + public function setOriginalimagename($originalimagename) + { + $this->container['originalimagename'] = $originalimagename; + return $this; + } + + /** + * Gets osBit + * 操作系统位数,一般取值为“32”或者“64”。 + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 操作系统位数,一般取值为“32”或者“64”。 + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 操作系统类型,目前取值Linux, Windows,Other。 + * + * @return string + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string $osType 操作系统类型,目前取值Linux, Windows,Other。 + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets osVersion + * 操作系统具体版本。 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 操作系统具体版本。 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets platform + * 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets productcode + * 市场镜像的产品ID。 + * + * @return string|null + */ + public function getProductcode() + { + return $this->container['productcode']; + } + + /** + * Sets productcode + * + * @param string|null $productcode 市场镜像的产品ID。 + * + * @return $this + */ + public function setProductcode($productcode) + { + $this->container['productcode'] = $productcode; + return $this; + } + + /** + * Gets supportDiskintensive + * 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportDiskintensive() + { + return $this->container['supportDiskintensive']; + } + + /** + * Sets supportDiskintensive + * + * @param string|null $supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportDiskintensive($supportDiskintensive) + { + $this->container['supportDiskintensive'] = $supportDiskintensive; + return $this; + } + + /** + * Gets supportHighperformance + * 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportHighperformance() + { + return $this->container['supportHighperformance']; + } + + /** + * Sets supportHighperformance + * + * @param string|null $supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportHighperformance($supportHighperformance) + { + $this->container['supportHighperformance'] = $supportHighperformance; + return $this; + } + + /** + * Gets supportKvm + * 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportKvm() + { + return $this->container['supportKvm']; + } + + /** + * Sets supportKvm + * + * @param string|null $supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportKvm($supportKvm) + { + $this->container['supportKvm'] = $supportKvm; + return $this; + } + + /** + * Gets supportKvmGpuType + * 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmGpuType() + { + return $this->container['supportKvmGpuType']; + } + + /** + * Sets supportKvmGpuType + * + * @param string|null $supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportKvmGpuType($supportKvmGpuType) + { + $this->container['supportKvmGpuType'] = $supportKvmGpuType; + return $this; + } + + /** + * Gets supportKvmInfiniband + * 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmInfiniband() + { + return $this->container['supportKvmInfiniband']; + } + + /** + * Sets supportKvmInfiniband + * + * @param string|null $supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return $this + */ + public function setSupportKvmInfiniband($supportKvmInfiniband) + { + $this->container['supportKvmInfiniband'] = $supportKvmInfiniband; + return $this; + } + + /** + * Gets supportLargememory + * 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportLargememory() + { + return $this->container['supportLargememory']; + } + + /** + * Sets supportLargememory + * + * @param string|null $supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportLargememory($supportLargememory) + { + $this->container['supportLargememory'] = $supportLargememory; + return $this; + } + + /** + * Gets supportXen + * 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportXen() + { + return $this->container['supportXen']; + } + + /** + * Sets supportXen + * + * @param string|null $supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportXen($supportXen) + { + $this->container['supportXen'] = $supportXen; + return $this; + } + + /** + * Gets supportXenGpuType + * 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenGpuType() + { + return $this->container['supportXenGpuType']; + } + + /** + * Sets supportXenGpuType + * + * @param string|null $supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenGpuType($supportXenGpuType) + { + $this->container['supportXenGpuType'] = $supportXenGpuType; + return $this; + } + + /** + * Gets supportXenHana + * 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenHana() + { + return $this->container['supportXenHana']; + } + + /** + * Sets supportXenHana + * + * @param string|null $supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenHana($supportXenHana) + { + $this->container['supportXenHana'] = $supportXenHana; + return $this; + } + + /** + * Gets checksum + * 目前暂时不使用。 + * + * @return string|null + */ + public function getChecksum() + { + return $this->container['checksum']; + } + + /** + * Sets checksum + * + * @param string|null $checksum 目前暂时不使用。 + * + * @return $this + */ + public function setChecksum($checksum) + { + $this->container['checksum'] = $checksum; + return $this; + } + + /** + * Gets containerFormat + * 容器类型。 + * + * @return string + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string $containerFormat 容器类型。 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets createdAt + * 创建时间。格式为UTC时间。 + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt 创建时间。格式为UTC时间。 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets diskFormat + * 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return string + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string $diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets file + * 镜像文件下载和上传链接。 + * + * @return string + */ + public function getFile() + { + return $this->container['file']; + } + + /** + * Sets file + * + * @param string $file 镜像文件下载和上传链接。 + * + * @return $this + */ + public function setFile($file) + { + $this->container['file'] = $file; + return $this; + } + + /** + * Gets id + * 镜像ID。 + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 镜像ID。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘容量,单位为GB + * + * @return int + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int $minDisk 镜像运行需要的最小磁盘容量,单位为GB + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行最小内存,单位为MB。 + * + * @return int + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int $minRam 镜像运行最小内存,单位为MB。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets owner + * 镜像属于哪个租户。 + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner 镜像属于哪个租户。 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets protected + * 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * + * @return bool + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool $protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets schema + * 镜像视图。 + * + * @return string + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string $schema 镜像视图。 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Gets self + * 镜像链接信息。 + * + * @return string + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string $self 镜像链接信息。 + * + * @return $this + */ + public function setSelf($self) + { + $this->container['self'] = $self; + return $this; + } + + /** + * Gets size + * 目前暂时不使用。 + * + * @return int|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size 目前暂时不使用。 + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets tags + * 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets updatedAt + * 更新时间。格式为UTC时间。 + * + * @return string + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string $updatedAt 更新时间。格式为UTC时间。 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets virtualEnvType + * 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * + * @return string + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string $virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets virtualSize + * 目前暂时不使用。 + * + * @return int|null + */ + public function getVirtualSize() + { + return $this->container['virtualSize']; + } + + /** + * Sets virtualSize + * + * @param int|null $virtualSize 目前暂时不使用。 + * + * @return $this + */ + public function setVirtualSize($virtualSize) + { + $this->container['virtualSize'] = $virtualSize; + return $this; + } + + /** + * Gets visibility + * 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * + * @return string + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string $visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets supportFcInject + * 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return string|null + */ + public function getSupportFcInject() + { + return $this->container['supportFcInject']; + } + + /** + * Sets supportFcInject + * + * @param string|null $supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return $this + */ + public function setSupportFcInject($supportFcInject) + { + $this->container['supportFcInject'] = $supportFcInject; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets hwFirmwareType + * 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return string|null + */ + public function getHwFirmwareType() + { + return $this->container['hwFirmwareType']; + } + + /** + * Sets hwFirmwareType + * + * @param string|null $hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return $this + */ + public function setHwFirmwareType($hwFirmwareType) + { + $this->container['hwFirmwareType'] = $hwFirmwareType; + return $this; + } + + /** + * Gets supportArm + * 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportArm() + { + return $this->container['supportArm']; + } + + /** + * Sets supportArm + * + * @param string|null $supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportArm($supportArm) + { + $this->container['supportArm'] = $supportArm; + return $this; + } + + /** + * Gets isOffshelved + * 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * + * @return string|null + */ + public function getIsOffshelved() + { + return $this->container['isOffshelved']; + } + + /** + * Sets isOffshelved + * + * @param string|null $isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * + * @return $this + */ + public function setIsOffshelved($isOffshelved) + { + $this->container['isOffshelved'] = $isOffshelved; + return $this; + } + + /** + * Gets lazyloading + * 镜像是否支持延迟加载。取值为True或False。 + * + * @return string|null + */ + public function getLazyloading() + { + return $this->container['lazyloading']; + } + + /** + * Sets lazyloading + * + * @param string|null $lazyloading 镜像是否支持延迟加载。取值为True或False。 + * + * @return $this + */ + public function setLazyloading($lazyloading) + { + $this->container['lazyloading'] = $lazyloading; + return $this; + } + + /** + * Gets osFeatureList + * 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return string|null + */ + public function getOsFeatureList() + { + return $this->container['osFeatureList']; + } + + /** + * Sets osFeatureList + * + * @param string|null $osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return $this + */ + public function setOsFeatureList($osFeatureList) + { + $this->container['osFeatureList'] = $osFeatureList; + return $this; + } + + /** + * Gets rootOrigin + * 表示当前镜像来源是从外部导入。取值:file。 + * + * @return string|null + */ + public function getRootOrigin() + { + return $this->container['rootOrigin']; + } + + /** + * Sets rootOrigin + * + * @param string|null $rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * + * @return $this + */ + public function setRootOrigin($rootOrigin) + { + $this->container['rootOrigin'] = $rootOrigin; + return $this; + } + + /** + * Gets sequenceNum + * 目前暂时不用 + * + * @return string|null + */ + public function getSequenceNum() + { + return $this->container['sequenceNum']; + } + + /** + * Sets sequenceNum + * + * @param string|null $sequenceNum 目前暂时不用 + * + * @return $this + */ + public function setSequenceNum($sequenceNum) + { + $this->container['sequenceNum'] = $sequenceNum; + return $this; + } + + /** + * Gets supportAgentList + * 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return string|null + */ + public function getSupportAgentList() + { + return $this->container['supportAgentList']; + } + + /** + * Sets supportAgentList + * + * @param string|null $supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return $this + */ + public function setSupportAgentList($supportAgentList) + { + $this->container['supportAgentList'] = $supportAgentList; + return $this; + } + + /** + * Gets systemCmkid + * 加密镜像所使用的密钥ID。 + * + * @return string|null + */ + public function getSystemCmkid() + { + return $this->container['systemCmkid']; + } + + /** + * Sets systemCmkid + * + * @param string|null $systemCmkid 加密镜像所使用的密钥ID。 + * + * @return $this + */ + public function setSystemCmkid($systemCmkid) + { + $this->container['systemCmkid'] = $systemCmkid; + return $this; + } + + /** + * Gets activeAt + * 镜像状态变为正常的时间。 + * + * @return string|null + */ + public function getActiveAt() + { + return $this->container['activeAt']; + } + + /** + * Sets activeAt + * + * @param string|null $activeAt 镜像状态变为正常的时间。 + * + * @return $this + */ + public function setActiveAt($activeAt) + { + $this->container['activeAt'] = $activeAt; + return $this; + } + + /** + * Gets hwVifMultiqueueEnabled + * 镜像是否支持网卡多队列。取值为true或者false。 + * + * @return string|null + */ + public function getHwVifMultiqueueEnabled() + { + return $this->container['hwVifMultiqueueEnabled']; + } + + /** + * Sets hwVifMultiqueueEnabled + * + * @param string|null $hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * + * @return $this + */ + public function setHwVifMultiqueueEnabled($hwVifMultiqueueEnabled) + { + $this->container['hwVifMultiqueueEnabled'] = $hwVifMultiqueueEnabled; + return $this; + } + + /** + * Gets maxRam + * 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return string|null + */ + public function getMaxRam() + { + return $this->container['maxRam']; + } + + /** + * Sets maxRam + * + * @param string|null $maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return $this + */ + public function setMaxRam($maxRam) + { + $this->container['maxRam'] = $maxRam; + return $this; + } + + /** + * Gets imageLocation + * 镜像的存储位置。 + * + * @return string|null + */ + public function getImageLocation() + { + return $this->container['imageLocation']; + } + + /** + * Sets imageLocation + * + * @param string|null $imageLocation 镜像的存储位置。 + * + * @return $this + */ + public function setImageLocation($imageLocation) + { + $this->container['imageLocation'] = $imageLocation; + return $this; + } + + /** + * Gets isConfigInit + * 是否完成了初始化配置。取值为true或false + * + * @return string|null + */ + public function getIsConfigInit() + { + return $this->container['isConfigInit']; + } + + /** + * Sets isConfigInit + * + * @param string|null $isConfigInit 是否完成了初始化配置。取值为true或false + * + * @return $this + */ + public function setIsConfigInit($isConfigInit) + { + $this->container['isConfigInit'] = $isConfigInit; + return $this; + } + + /** + * Gets accountCode + * 收费镜像标识。 + * + * @return string|null + */ + public function getAccountCode() + { + return $this->container['accountCode']; + } + + /** + * Sets accountCode + * + * @param string|null $accountCode 收费镜像标识。 + * + * @return $this + */ + public function setAccountCode($accountCode) + { + $this->container['accountCode'] = $accountCode; + return $this; + } + + /** + * Gets supportAmd + * 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportAmd() + { + return $this->container['supportAmd']; + } + + /** + * Sets supportAmd + * + * @param string|null $supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportAmd($supportAmd) + { + $this->container['supportAmd'] = $supportAmd; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageSchemasRequest.php b/Services/Ims/V2/Model/GlanceShowImageSchemasRequest.php new file mode 100755 index 0000000..136169e --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageSchemasRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceShowImageSchemasResponse.php b/Services/Ims/V2/Model/GlanceShowImageSchemasResponse.php new file mode 100755 index 0000000..10fee37 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceShowImageSchemasResponse.php @@ -0,0 +1,371 @@ + '\G42Cloud\SDK\Ims\V2\Model\AdditionalProperties', + 'name' => 'string', + 'properties' => 'object', + 'links' => '\G42Cloud\SDK\Ims\V2\Model\Links[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * additionalProperties additionalProperties + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'additionalProperties' => null, + 'name' => null, + 'properties' => null, + 'links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * additionalProperties additionalProperties + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'additionalProperties' => 'additionalProperties', + 'name' => 'name', + 'properties' => 'properties', + 'links' => 'links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * additionalProperties additionalProperties + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $setters = [ + 'additionalProperties' => 'setAdditionalProperties', + 'name' => 'setName', + 'properties' => 'setProperties', + 'links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * additionalProperties additionalProperties + * name 视图名称。 + * properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * links 视图链接。 + * + * @var string[] + */ + protected static $getters = [ + 'additionalProperties' => 'getAdditionalProperties', + 'name' => 'getName', + 'properties' => 'getProperties', + 'links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['additionalProperties'] = isset($data['additionalProperties']) ? $data['additionalProperties'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['properties'] = isset($data['properties']) ? $data['properties'] : null; + $this->container['links'] = isset($data['links']) ? $data['links'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets additionalProperties + * additionalProperties + * + * @return \G42Cloud\SDK\Ims\V2\Model\AdditionalProperties|null + */ + public function getAdditionalProperties() + { + return $this->container['additionalProperties']; + } + + /** + * Sets additionalProperties + * + * @param \G42Cloud\SDK\Ims\V2\Model\AdditionalProperties|null $additionalProperties additionalProperties + * + * @return $this + */ + public function setAdditionalProperties($additionalProperties) + { + $this->container['additionalProperties'] = $additionalProperties; + return $this; + } + + /** + * Gets name + * 视图名称。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 视图名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets properties + * 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @return object|null + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param object|null $properties 镜像属性说明,主要是对基础属性的说明,包含每个属性的取值类型、用途等。 + * + * @return $this + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + return $this; + } + + /** + * Gets links + * 视图链接。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Links[]|null + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \G42Cloud\SDK\Ims\V2\Model\Links[]|null $links 视图链接。 + * + * @return $this + */ + public function setLinks($links) + { + $this->container['links'] = $links; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceUpdateImageMemberRequest.php b/Services/Ims/V2/Model/GlanceUpdateImageMemberRequest.php new file mode 100755 index 0000000..aa1013b --- /dev/null +++ b/Services/Ims/V2/Model/GlanceUpdateImageMemberRequest.php @@ -0,0 +1,341 @@ + 'string', + 'memberId' => 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageMemberRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像id + * memberId 成员id + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'memberId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像id + * memberId 成员id + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'memberId' => 'member_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像id + * memberId 成员id + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'memberId' => 'setMemberId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像id + * memberId 成员id + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'memberId' => 'getMemberId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['memberId'] = isset($data['memberId']) ? $data['memberId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + if ($this->container['memberId'] === null) { + $invalidProperties[] = "'memberId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像id + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像id + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets memberId + * 成员id + * + * @return string + */ + public function getMemberId() + { + return $this->container['memberId']; + } + + /** + * Sets memberId + * + * @param string $memberId 成员id + * + * @return $this + */ + public function setMemberId($memberId) + { + $this->container['memberId'] = $memberId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageMemberRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageMemberRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceUpdateImageMemberRequestBody.php b/Services/Ims/V2/Model/GlanceUpdateImageMemberRequestBody.php new file mode 100755 index 0000000..af209f8 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceUpdateImageMemberRequestBody.php @@ -0,0 +1,326 @@ + 'string', + 'vaultId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 存储库ID可以从云备份服务控制台获取,或者参考《云备份接口参考》的“查询存储库列表”章节查询。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'vaultId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 存储库ID可以从云备份服务控制台获取,或者参考《云备份接口参考》的“查询存储库列表”章节查询。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'vaultId' => 'vault_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 存储库ID可以从云备份服务控制台获取,或者参考《云备份接口参考》的“查询存储库列表”章节查询。 + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'vaultId' => 'setVaultId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * vaultId 存储库ID。 如果是CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 存储库ID可以从云备份服务控制台获取,或者参考《云备份接口参考》的“查询存储库列表”章节查询。 + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'vaultId' => 'getVaultId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const STATUS_ACCEPTED = 'accepted'; + const STATUS_REJECTED = 'rejected'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACCEPTED, + self::STATUS_REJECTED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['vaultId'] = isset($data['vaultId']) ? $data['vaultId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 镜像成员的状态。 取值如下: accepted:表示接受共享镜像。接受后,该镜像在用户镜像列表中可见,用户可以使用该镜像创建云服务器。 rejected:表示拒绝共享镜像。拒绝后,该镜像在用户镜像列表中不可见,但是,用户仍然可以使用该镜像创建云服务器。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets vaultId + * 存储库ID。 如果是CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 存储库ID可以从云备份服务控制台获取,或者参考《云备份接口参考》的“查询存储库列表”章节查询。 + * + * @return string|null + */ + public function getVaultId() + { + return $this->container['vaultId']; + } + + /** + * Sets vaultId + * + * @param string|null $vaultId 存储库ID。 如果是CBR创建的整机镜像,则在接受该共享镜像时,为必选参数,需传入该值。 存储库ID可以从云备份服务控制台获取,或者参考《云备份接口参考》的“查询存储库列表”章节查询。 + * + * @return $this + */ + public function setVaultId($vaultId) + { + $this->container['vaultId'] = $vaultId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceUpdateImageMemberResponse.php b/Services/Ims/V2/Model/GlanceUpdateImageMemberResponse.php new file mode 100755 index 0000000..6e9e778 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceUpdateImageMemberResponse.php @@ -0,0 +1,441 @@ + 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string', + 'imageId' => 'string', + 'memberId' => 'string', + 'schema' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'createdAt' => null, + 'updatedAt' => null, + 'imageId' => null, + 'memberId' => null, + 'schema' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'imageId' => 'image_id', + 'memberId' => 'member_id', + 'schema' => 'schema' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', + 'imageId' => 'setImageId', + 'memberId' => 'setMemberId', + 'schema' => 'setSchema' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 共享状态 + * createdAt 共享时间,格式为UTC时间 + * updatedAt 更新时间,格式为UTC时间 + * imageId 镜像ID + * memberId 成员ID + * schema 共享视图 + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', + 'imageId' => 'getImageId', + 'memberId' => 'getMemberId', + 'schema' => 'getSchema' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['memberId'] = isset($data['memberId']) ? $data['memberId'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 共享状态 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 共享状态 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets createdAt + * 共享时间,格式为UTC时间 + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 共享时间,格式为UTC时间 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 更新时间,格式为UTC时间 + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 更新时间,格式为UTC时间 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string|null + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string|null $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets memberId + * 成员ID + * + * @return string|null + */ + public function getMemberId() + { + return $this->container['memberId']; + } + + /** + * Sets memberId + * + * @param string|null $memberId 成员ID + * + * @return $this + */ + public function setMemberId($memberId) + { + $this->container['memberId'] = $memberId; + return $this; + } + + /** + * Gets schema + * 共享视图 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 共享视图 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceUpdateImageRequest.php b/Services/Ims/V2/Model/GlanceUpdateImageRequest.php new file mode 100755 index 0000000..29a4ab3 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceUpdateImageRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageRequestBody[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageRequestBody[]|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\GlanceUpdateImageRequestBody[]|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceUpdateImageRequestBody.php b/Services/Ims/V2/Model/GlanceUpdateImageRequestBody.php new file mode 100755 index 0000000..6535938 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceUpdateImageRequestBody.php @@ -0,0 +1,366 @@ + 'string', + 'path' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * op 所需进行的更新操作的类型:替换、添加、删除。取值范围:replace、add、remove + * path 所要操作的属性名称。 replace和remove操作取值只能是镜像当前已有的属性、add操作取值只能是镜像当前不存在的属性,需要在属性名称前加”/” + * value 所需更新/添加属性的值 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'op' => null, + 'path' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * op 所需进行的更新操作的类型:替换、添加、删除。取值范围:replace、add、remove + * path 所要操作的属性名称。 replace和remove操作取值只能是镜像当前已有的属性、add操作取值只能是镜像当前不存在的属性,需要在属性名称前加”/” + * value 所需更新/添加属性的值 + * + * @var string[] + */ + protected static $attributeMap = [ + 'op' => 'op', + 'path' => 'path', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * op 所需进行的更新操作的类型:替换、添加、删除。取值范围:replace、add、remove + * path 所要操作的属性名称。 replace和remove操作取值只能是镜像当前已有的属性、add操作取值只能是镜像当前不存在的属性,需要在属性名称前加”/” + * value 所需更新/添加属性的值 + * + * @var string[] + */ + protected static $setters = [ + 'op' => 'setOp', + 'path' => 'setPath', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * op 所需进行的更新操作的类型:替换、添加、删除。取值范围:replace、add、remove + * path 所要操作的属性名称。 replace和remove操作取值只能是镜像当前已有的属性、add操作取值只能是镜像当前不存在的属性,需要在属性名称前加”/” + * value 所需更新/添加属性的值 + * + * @var string[] + */ + protected static $getters = [ + 'op' => 'getOp', + 'path' => 'getPath', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const OP_REPLACE = 'replace'; + const OP_ADD = 'add'; + const OP_REMOVE = 'remove'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOpAllowableValues() + { + return [ + self::OP_REPLACE, + self::OP_ADD, + self::OP_REMOVE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['op'] = isset($data['op']) ? $data['op'] : null; + $this->container['path'] = isset($data['path']) ? $data['path'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['op'] === null) { + $invalidProperties[] = "'op' can't be null"; + } + $allowedValues = $this->getOpAllowableValues(); + if (!is_null($this->container['op']) && !in_array($this->container['op'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'op', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['path'] === null) { + $invalidProperties[] = "'path' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets op + * 所需进行的更新操作的类型:替换、添加、删除。取值范围:replace、add、remove + * + * @return string + */ + public function getOp() + { + return $this->container['op']; + } + + /** + * Sets op + * + * @param string $op 所需进行的更新操作的类型:替换、添加、删除。取值范围:replace、add、remove + * + * @return $this + */ + public function setOp($op) + { + $this->container['op'] = $op; + return $this; + } + + /** + * Gets path + * 所要操作的属性名称。 replace和remove操作取值只能是镜像当前已有的属性、add操作取值只能是镜像当前不存在的属性,需要在属性名称前加”/” + * + * @return string + */ + public function getPath() + { + return $this->container['path']; + } + + /** + * Sets path + * + * @param string $path 所要操作的属性名称。 replace和remove操作取值只能是镜像当前已有的属性、add操作取值只能是镜像当前不存在的属性,需要在属性名称前加”/” + * + * @return $this + */ + public function setPath($path) + { + $this->container['path'] = $path; + return $this; + } + + /** + * Gets value + * 所需更新/添加属性的值 + * + * @return string|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value 所需更新/添加属性的值 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/GlanceUpdateImageResponse.php b/Services/Ims/V2/Model/GlanceUpdateImageResponse.php new file mode 100755 index 0000000..f73ecd7 --- /dev/null +++ b/Services/Ims/V2/Model/GlanceUpdateImageResponse.php @@ -0,0 +1,2695 @@ + 'string', + 'dataOrigin' => 'string', + 'description' => 'string', + 'imageSize' => 'string', + 'imageSourceType' => 'string', + 'imagetype' => 'string', + 'isregistered' => 'string', + 'originalimagename' => 'string', + 'osBit' => 'string', + 'osType' => 'string', + 'osVersion' => 'string', + 'platform' => 'string', + 'productcode' => 'string', + 'supportDiskintensive' => 'string', + 'supportHighperformance' => 'string', + 'supportKvm' => 'string', + 'supportKvmGpuType' => 'string', + 'supportKvmInfiniband' => 'string', + 'supportLargememory' => 'string', + 'supportXen' => 'string', + 'supportXenGpuType' => 'string', + 'supportXenHana' => 'string', + 'checksum' => 'string', + 'containerFormat' => 'string', + 'createdAt' => 'string', + 'diskFormat' => 'string', + 'file' => 'string', + 'id' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'protected' => 'bool', + 'schema' => 'string', + 'self' => 'string', + 'size' => 'int', + 'status' => 'string', + 'tags' => 'string[]', + 'updatedAt' => 'string', + 'virtualEnvType' => 'string', + 'virtualSize' => 'int', + 'visibility' => 'string', + 'supportFcInject' => 'string', + 'enterpriseProjectId' => 'string', + 'hwFirmwareType' => 'string', + 'supportArm' => 'string', + 'isOffshelved' => 'string', + 'lazyloading' => 'string', + 'osFeatureList' => 'string', + 'rootOrigin' => 'string', + 'sequenceNum' => 'string', + 'supportAgentList' => 'string', + 'systemCmkid' => 'string', + 'activeAt' => 'string', + 'hwVifMultiqueueEnabled' => 'string', + 'maxRam' => 'string', + 'imageLocation' => 'string', + 'isConfigInit' => 'string', + 'accountCode' => 'string', + 'supportAmd' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'backupId' => null, + 'dataOrigin' => null, + 'description' => null, + 'imageSize' => null, + 'imageSourceType' => null, + 'imagetype' => null, + 'isregistered' => null, + 'originalimagename' => null, + 'osBit' => null, + 'osType' => null, + 'osVersion' => null, + 'platform' => null, + 'productcode' => null, + 'supportDiskintensive' => null, + 'supportHighperformance' => null, + 'supportKvm' => null, + 'supportKvmGpuType' => null, + 'supportKvmInfiniband' => null, + 'supportLargememory' => null, + 'supportXen' => null, + 'supportXenGpuType' => null, + 'supportXenHana' => null, + 'checksum' => null, + 'containerFormat' => null, + 'createdAt' => null, + 'diskFormat' => null, + 'file' => null, + 'id' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'owner' => null, + 'protected' => null, + 'schema' => null, + 'self' => null, + 'size' => 'int64', + 'status' => null, + 'tags' => null, + 'updatedAt' => null, + 'virtualEnvType' => null, + 'virtualSize' => 'int32', + 'visibility' => null, + 'supportFcInject' => null, + 'enterpriseProjectId' => null, + 'hwFirmwareType' => null, + 'supportArm' => null, + 'isOffshelved' => null, + 'lazyloading' => null, + 'osFeatureList' => null, + 'rootOrigin' => null, + 'sequenceNum' => null, + 'supportAgentList' => null, + 'systemCmkid' => null, + 'activeAt' => null, + 'hwVifMultiqueueEnabled' => null, + 'maxRam' => null, + 'imageLocation' => null, + 'isConfigInit' => null, + 'accountCode' => null, + 'supportAmd' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'backupId' => '__backup_id', + 'dataOrigin' => '__data_origin', + 'description' => '__description', + 'imageSize' => '__image_size', + 'imageSourceType' => '__image_source_type', + 'imagetype' => '__imagetype', + 'isregistered' => '__isregistered', + 'originalimagename' => '__originalimagename', + 'osBit' => '__os_bit', + 'osType' => '__os_type', + 'osVersion' => '__os_version', + 'platform' => '__platform', + 'productcode' => '__productcode', + 'supportDiskintensive' => '__support_diskintensive', + 'supportHighperformance' => '__support_highperformance', + 'supportKvm' => '__support_kvm', + 'supportKvmGpuType' => '__support_kvm_gpu_type', + 'supportKvmInfiniband' => '__support_kvm_infiniband', + 'supportLargememory' => '__support_largememory', + 'supportXen' => '__support_xen', + 'supportXenGpuType' => '__support_xen_gpu_type', + 'supportXenHana' => '__support_xen_hana', + 'checksum' => 'checksum', + 'containerFormat' => 'container_format', + 'createdAt' => 'created_at', + 'diskFormat' => 'disk_format', + 'file' => 'file', + 'id' => 'id', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'owner' => 'owner', + 'protected' => 'protected', + 'schema' => 'schema', + 'self' => 'self', + 'size' => 'size', + 'status' => 'status', + 'tags' => 'tags', + 'updatedAt' => 'updated_at', + 'virtualEnvType' => 'virtual_env_type', + 'virtualSize' => 'virtual_size', + 'visibility' => 'visibility', + 'supportFcInject' => '__support_fc_inject', + 'enterpriseProjectId' => 'enterprise_project_id', + 'hwFirmwareType' => 'hw_firmware_type', + 'supportArm' => '__support_arm', + 'isOffshelved' => '__is_offshelved', + 'lazyloading' => '__lazyloading', + 'osFeatureList' => '__os_feature_list', + 'rootOrigin' => '__root_origin', + 'sequenceNum' => '__sequence_num', + 'supportAgentList' => '__support_agent_list', + 'systemCmkid' => '__system__cmkid', + 'activeAt' => 'active_at', + 'hwVifMultiqueueEnabled' => 'hw_vif_multiqueue_enabled', + 'maxRam' => 'max_ram', + 'imageLocation' => '__image_location', + 'isConfigInit' => '__is_config_init', + 'accountCode' => '__account_code', + 'supportAmd' => '__support_amd' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $setters = [ + 'backupId' => 'setBackupId', + 'dataOrigin' => 'setDataOrigin', + 'description' => 'setDescription', + 'imageSize' => 'setImageSize', + 'imageSourceType' => 'setImageSourceType', + 'imagetype' => 'setImagetype', + 'isregistered' => 'setIsregistered', + 'originalimagename' => 'setOriginalimagename', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType', + 'osVersion' => 'setOsVersion', + 'platform' => 'setPlatform', + 'productcode' => 'setProductcode', + 'supportDiskintensive' => 'setSupportDiskintensive', + 'supportHighperformance' => 'setSupportHighperformance', + 'supportKvm' => 'setSupportKvm', + 'supportKvmGpuType' => 'setSupportKvmGpuType', + 'supportKvmInfiniband' => 'setSupportKvmInfiniband', + 'supportLargememory' => 'setSupportLargememory', + 'supportXen' => 'setSupportXen', + 'supportXenGpuType' => 'setSupportXenGpuType', + 'supportXenHana' => 'setSupportXenHana', + 'checksum' => 'setChecksum', + 'containerFormat' => 'setContainerFormat', + 'createdAt' => 'setCreatedAt', + 'diskFormat' => 'setDiskFormat', + 'file' => 'setFile', + 'id' => 'setId', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'owner' => 'setOwner', + 'protected' => 'setProtected', + 'schema' => 'setSchema', + 'self' => 'setSelf', + 'size' => 'setSize', + 'status' => 'setStatus', + 'tags' => 'setTags', + 'updatedAt' => 'setUpdatedAt', + 'virtualEnvType' => 'setVirtualEnvType', + 'virtualSize' => 'setVirtualSize', + 'visibility' => 'setVisibility', + 'supportFcInject' => 'setSupportFcInject', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'hwFirmwareType' => 'setHwFirmwareType', + 'supportArm' => 'setSupportArm', + 'isOffshelved' => 'setIsOffshelved', + 'lazyloading' => 'setLazyloading', + 'osFeatureList' => 'setOsFeatureList', + 'rootOrigin' => 'setRootOrigin', + 'sequenceNum' => 'setSequenceNum', + 'supportAgentList' => 'setSupportAgentList', + 'systemCmkid' => 'setSystemCmkid', + 'activeAt' => 'setActiveAt', + 'hwVifMultiqueueEnabled' => 'setHwVifMultiqueueEnabled', + 'maxRam' => 'setMaxRam', + 'imageLocation' => 'setImageLocation', + 'isConfigInit' => 'setIsConfigInit', + 'accountCode' => 'setAccountCode', + 'supportAmd' => 'setSupportAmd' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * dataOrigin 镜像来源。公共镜像为空。 + * description 镜像描述信息。 + * imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * osBit 操作系统位数,一般取值为“32”或者“64”。 + * osType 操作系统类型,目前取值Linux, Windows,Other。 + * osVersion 操作系统具体版本。 + * platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * productcode 市场镜像的产品ID。 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * checksum 目前暂时不使用。 + * containerFormat 容器类型。 + * createdAt 创建时间。格式为UTC时间。 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * file 镜像文件下载和上传链接。 + * id 镜像ID。 + * minDisk 镜像运行需要的最小磁盘容量,单位为GB + * minRam 镜像运行最小内存,单位为MB。 + * name 镜像名称。 + * owner 镜像属于哪个租户。 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * schema 镜像视图。 + * self 镜像链接信息。 + * size 目前暂时不使用。 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * updatedAt 更新时间。格式为UTC时间。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * virtualSize 目前暂时不使用。 + * visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为True或False。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 目前暂时不用 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * systemCmkid 加密镜像所使用的密钥ID。 + * activeAt 镜像状态变为正常的时间。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * imageLocation 镜像的存储位置。 + * isConfigInit 是否完成了初始化配置。取值为true或false + * accountCode 收费镜像标识。 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $getters = [ + 'backupId' => 'getBackupId', + 'dataOrigin' => 'getDataOrigin', + 'description' => 'getDescription', + 'imageSize' => 'getImageSize', + 'imageSourceType' => 'getImageSourceType', + 'imagetype' => 'getImagetype', + 'isregistered' => 'getIsregistered', + 'originalimagename' => 'getOriginalimagename', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType', + 'osVersion' => 'getOsVersion', + 'platform' => 'getPlatform', + 'productcode' => 'getProductcode', + 'supportDiskintensive' => 'getSupportDiskintensive', + 'supportHighperformance' => 'getSupportHighperformance', + 'supportKvm' => 'getSupportKvm', + 'supportKvmGpuType' => 'getSupportKvmGpuType', + 'supportKvmInfiniband' => 'getSupportKvmInfiniband', + 'supportLargememory' => 'getSupportLargememory', + 'supportXen' => 'getSupportXen', + 'supportXenGpuType' => 'getSupportXenGpuType', + 'supportXenHana' => 'getSupportXenHana', + 'checksum' => 'getChecksum', + 'containerFormat' => 'getContainerFormat', + 'createdAt' => 'getCreatedAt', + 'diskFormat' => 'getDiskFormat', + 'file' => 'getFile', + 'id' => 'getId', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'owner' => 'getOwner', + 'protected' => 'getProtected', + 'schema' => 'getSchema', + 'self' => 'getSelf', + 'size' => 'getSize', + 'status' => 'getStatus', + 'tags' => 'getTags', + 'updatedAt' => 'getUpdatedAt', + 'virtualEnvType' => 'getVirtualEnvType', + 'virtualSize' => 'getVirtualSize', + 'visibility' => 'getVisibility', + 'supportFcInject' => 'getSupportFcInject', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'hwFirmwareType' => 'getHwFirmwareType', + 'supportArm' => 'getSupportArm', + 'isOffshelved' => 'getIsOffshelved', + 'lazyloading' => 'getLazyloading', + 'osFeatureList' => 'getOsFeatureList', + 'rootOrigin' => 'getRootOrigin', + 'sequenceNum' => 'getSequenceNum', + 'supportAgentList' => 'getSupportAgentList', + 'systemCmkid' => 'getSystemCmkid', + 'activeAt' => 'getActiveAt', + 'hwVifMultiqueueEnabled' => 'getHwVifMultiqueueEnabled', + 'maxRam' => 'getMaxRam', + 'imageLocation' => 'getImageLocation', + 'isConfigInit' => 'getIsConfigInit', + 'accountCode' => 'getAccountCode', + 'supportAmd' => 'getSupportAmd' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGE_SOURCE_TYPE_UDS = 'uds'; + const IMAGE_SOURCE_TYPE_SWIFT = 'swift'; + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const IMAGETYPE_MARKET = 'market'; + const ISREGISTERED_TRUE = 'true'; + const ISREGISTERED_FALSE = 'false'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const PLATFORM_WINDOWS = 'Windows'; + const PLATFORM_UBUNTU = 'Ubuntu'; + const PLATFORM_RED_HAT = 'RedHat'; + const PLATFORM_SUSE = 'SUSE'; + const PLATFORM_CENT_OS = 'CentOS'; + const PLATFORM_DEBIAN = 'Debian'; + const PLATFORM_OPEN_SUSE = 'OpenSUSE'; + const PLATFORM_ORACLE_LINUX = 'OracleLinux'; + const PLATFORM_FEDORA = 'Fedora'; + const PLATFORM_OTHER = 'Other'; + const PLATFORM_CORE_OS = 'CoreOS'; + const PLATFORM_EULER_OS = 'EulerOS'; + const DISK_FORMAT_VHD = 'vhd'; + const DISK_FORMAT_ZVHD = 'zvhd'; + const DISK_FORMAT_RAW = 'raw'; + const DISK_FORMAT_QCOW2 = 'qcow2'; + const DISK_FORMAT_ZVHD2 = 'zvhd2'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + const VISIBILITY__PRIVATE = 'private'; + const VISIBILITY__PUBLIC = 'public'; + const VISIBILITY_SHARED = 'shared'; + const SUPPORT_FC_INJECT_TRUE = 'true'; + const SUPPORT_FC_INJECT_FALSE = 'false'; + const HW_FIRMWARE_TYPE_BIOS = 'bios'; + const HW_FIRMWARE_TYPE_UEFI = 'uefi'; + const SUPPORT_ARM_TRUE = 'true'; + const SUPPORT_ARM_FALSE = 'false'; + const IS_OFFSHELVED_TRUE = 'true'; + const IS_OFFSHELVED_FALSE = 'false'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImageSourceTypeAllowableValues() + { + return [ + self::IMAGE_SOURCE_TYPE_UDS, + self::IMAGE_SOURCE_TYPE_SWIFT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + self::IMAGETYPE_MARKET, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsregisteredAllowableValues() + { + return [ + self::ISREGISTERED_TRUE, + self::ISREGISTERED_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_WINDOWS, + self::PLATFORM_UBUNTU, + self::PLATFORM_RED_HAT, + self::PLATFORM_SUSE, + self::PLATFORM_CENT_OS, + self::PLATFORM_DEBIAN, + self::PLATFORM_OPEN_SUSE, + self::PLATFORM_ORACLE_LINUX, + self::PLATFORM_FEDORA, + self::PLATFORM_OTHER, + self::PLATFORM_CORE_OS, + self::PLATFORM_EULER_OS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDiskFormatAllowableValues() + { + return [ + self::DISK_FORMAT_VHD, + self::DISK_FORMAT_ZVHD, + self::DISK_FORMAT_RAW, + self::DISK_FORMAT_QCOW2, + self::DISK_FORMAT_ZVHD2, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVisibilityAllowableValues() + { + return [ + self::VISIBILITY__PRIVATE, + self::VISIBILITY__PUBLIC, + self::VISIBILITY_SHARED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportFcInjectAllowableValues() + { + return [ + self::SUPPORT_FC_INJECT_TRUE, + self::SUPPORT_FC_INJECT_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHwFirmwareTypeAllowableValues() + { + return [ + self::HW_FIRMWARE_TYPE_BIOS, + self::HW_FIRMWARE_TYPE_UEFI, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportArmAllowableValues() + { + return [ + self::SUPPORT_ARM_TRUE, + self::SUPPORT_ARM_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsOffshelvedAllowableValues() + { + return [ + self::IS_OFFSHELVED_TRUE, + self::IS_OFFSHELVED_FALSE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['backupId'] = isset($data['backupId']) ? $data['backupId'] : null; + $this->container['dataOrigin'] = isset($data['dataOrigin']) ? $data['dataOrigin'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['imageSize'] = isset($data['imageSize']) ? $data['imageSize'] : null; + $this->container['imageSourceType'] = isset($data['imageSourceType']) ? $data['imageSourceType'] : null; + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : null; + $this->container['originalimagename'] = isset($data['originalimagename']) ? $data['originalimagename'] : null; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['productcode'] = isset($data['productcode']) ? $data['productcode'] : null; + $this->container['supportDiskintensive'] = isset($data['supportDiskintensive']) ? $data['supportDiskintensive'] : null; + $this->container['supportHighperformance'] = isset($data['supportHighperformance']) ? $data['supportHighperformance'] : null; + $this->container['supportKvm'] = isset($data['supportKvm']) ? $data['supportKvm'] : null; + $this->container['supportKvmGpuType'] = isset($data['supportKvmGpuType']) ? $data['supportKvmGpuType'] : null; + $this->container['supportKvmInfiniband'] = isset($data['supportKvmInfiniband']) ? $data['supportKvmInfiniband'] : null; + $this->container['supportLargememory'] = isset($data['supportLargememory']) ? $data['supportLargememory'] : null; + $this->container['supportXen'] = isset($data['supportXen']) ? $data['supportXen'] : null; + $this->container['supportXenGpuType'] = isset($data['supportXenGpuType']) ? $data['supportXenGpuType'] : null; + $this->container['supportXenHana'] = isset($data['supportXenHana']) ? $data['supportXenHana'] : null; + $this->container['checksum'] = isset($data['checksum']) ? $data['checksum'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['file'] = isset($data['file']) ? $data['file'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + $this->container['self'] = isset($data['self']) ? $data['self'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['virtualSize'] = isset($data['virtualSize']) ? $data['virtualSize'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['supportFcInject'] = isset($data['supportFcInject']) ? $data['supportFcInject'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['hwFirmwareType'] = isset($data['hwFirmwareType']) ? $data['hwFirmwareType'] : null; + $this->container['supportArm'] = isset($data['supportArm']) ? $data['supportArm'] : null; + $this->container['isOffshelved'] = isset($data['isOffshelved']) ? $data['isOffshelved'] : null; + $this->container['lazyloading'] = isset($data['lazyloading']) ? $data['lazyloading'] : null; + $this->container['osFeatureList'] = isset($data['osFeatureList']) ? $data['osFeatureList'] : null; + $this->container['rootOrigin'] = isset($data['rootOrigin']) ? $data['rootOrigin'] : null; + $this->container['sequenceNum'] = isset($data['sequenceNum']) ? $data['sequenceNum'] : null; + $this->container['supportAgentList'] = isset($data['supportAgentList']) ? $data['supportAgentList'] : null; + $this->container['systemCmkid'] = isset($data['systemCmkid']) ? $data['systemCmkid'] : null; + $this->container['activeAt'] = isset($data['activeAt']) ? $data['activeAt'] : null; + $this->container['hwVifMultiqueueEnabled'] = isset($data['hwVifMultiqueueEnabled']) ? $data['hwVifMultiqueueEnabled'] : null; + $this->container['maxRam'] = isset($data['maxRam']) ? $data['maxRam'] : null; + $this->container['imageLocation'] = isset($data['imageLocation']) ? $data['imageLocation'] : null; + $this->container['isConfigInit'] = isset($data['isConfigInit']) ? $data['isConfigInit'] : null; + $this->container['accountCode'] = isset($data['accountCode']) ? $data['accountCode'] : null; + $this->container['supportAmd'] = isset($data['supportAmd']) ? $data['supportAmd'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getImageSourceTypeAllowableValues(); + if (!is_null($this->container['imageSourceType']) && !in_array($this->container['imageSourceType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imageSourceType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsregisteredAllowableValues(); + if (!is_null($this->container['isregistered']) && !in_array($this->container['isregistered'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isregistered', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'platform', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDiskFormatAllowableValues(); + if (!is_null($this->container['diskFormat']) && !in_array($this->container['diskFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'diskFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVisibilityAllowableValues(); + if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'visibility', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportFcInjectAllowableValues(); + if (!is_null($this->container['supportFcInject']) && !in_array($this->container['supportFcInject'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportFcInject', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getHwFirmwareTypeAllowableValues(); + if (!is_null($this->container['hwFirmwareType']) && !in_array($this->container['hwFirmwareType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'hwFirmwareType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportArmAllowableValues(); + if (!is_null($this->container['supportArm']) && !in_array($this->container['supportArm'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportArm', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsOffshelvedAllowableValues(); + if (!is_null($this->container['isOffshelved']) && !in_array($this->container['isOffshelved'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isOffshelved', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets backupId + * 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * + * @return string|null + */ + public function getBackupId() + { + return $this->container['backupId']; + } + + /** + * Sets backupId + * + * @param string|null $backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空。 + * + * @return $this + */ + public function setBackupId($backupId) + { + $this->container['backupId'] = $backupId; + return $this; + } + + /** + * Gets dataOrigin + * 镜像来源。公共镜像为空。 + * + * @return string|null + */ + public function getDataOrigin() + { + return $this->container['dataOrigin']; + } + + /** + * Sets dataOrigin + * + * @param string|null $dataOrigin 镜像来源。公共镜像为空。 + * + * @return $this + */ + public function setDataOrigin($dataOrigin) + { + $this->container['dataOrigin'] = $dataOrigin; + return $this; + } + + /** + * Gets description + * 镜像描述信息。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets imageSize + * 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * + * @return string|null + */ + public function getImageSize() + { + return $this->container['imageSize']; + } + + /** + * Sets imageSize + * + * @param string|null $imageSize 镜像文件的大小,单位为字节。目前取值为大于0的字符串。 + * + * @return $this + */ + public function setImageSize($imageSize) + { + $this->container['imageSize'] = $imageSize; + return $this; + } + + /** + * Gets imageSourceType + * 镜像后端存储类型,目前只支持uds + * + * @return string|null + */ + public function getImageSourceType() + { + return $this->container['imageSourceType']; + } + + /** + * Sets imageSourceType + * + * @param string|null $imageSourceType 镜像后端存储类型,目前只支持uds + * + * @return $this + */ + public function setImageSourceType($imageSourceType) + { + $this->container['imageSourceType'] = $imageSourceType; + return $this; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return string|null + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string|null $imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets isregistered + * 是否是注册过的镜像,取值为“true”或者“false”。 + * + * @return string|null + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param string|null $isregistered 是否是注册过的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets originalimagename + * 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * + * @return string|null + */ + public function getOriginalimagename() + { + return $this->container['originalimagename']; + } + + /** + * Sets originalimagename + * + * @param string|null $originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空。 + * + * @return $this + */ + public function setOriginalimagename($originalimagename) + { + $this->container['originalimagename'] = $originalimagename; + return $this; + } + + /** + * Gets osBit + * 操作系统位数,一般取值为“32”或者“64”。 + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 操作系统位数,一般取值为“32”或者“64”。 + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 操作系统类型,目前取值Linux, Windows,Other。 + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 操作系统类型,目前取值Linux, Windows,Other。 + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets osVersion + * 操作系统具体版本。 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 操作系统具体版本。 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets platform + * 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类,取值为Windows,Ubuntu,RedHat,SUSE,CentOS,Debian,OpenSUSE, Oracle Linux,Fedora,Other,CoreOS和EulerOS。 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets productcode + * 市场镜像的产品ID。 + * + * @return string|null + */ + public function getProductcode() + { + return $this->container['productcode']; + } + + /** + * Sets productcode + * + * @param string|null $productcode 市场镜像的产品ID。 + * + * @return $this + */ + public function setProductcode($productcode) + { + $this->container['productcode'] = $productcode; + return $this; + } + + /** + * Gets supportDiskintensive + * 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportDiskintensive() + { + return $this->container['supportDiskintensive']; + } + + /** + * Sets supportDiskintensive + * + * @param string|null $supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportDiskintensive($supportDiskintensive) + { + $this->container['supportDiskintensive'] = $supportDiskintensive; + return $this; + } + + /** + * Gets supportHighperformance + * 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportHighperformance() + { + return $this->container['supportHighperformance']; + } + + /** + * Sets supportHighperformance + * + * @param string|null $supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportHighperformance($supportHighperformance) + { + $this->container['supportHighperformance'] = $supportHighperformance; + return $this; + } + + /** + * Gets supportKvm + * 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportKvm() + { + return $this->container['supportKvm']; + } + + /** + * Sets supportKvm + * + * @param string|null $supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportKvm($supportKvm) + { + $this->container['supportKvm'] = $supportKvm; + return $this; + } + + /** + * Gets supportKvmGpuType + * 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmGpuType() + { + return $this->container['supportKvmGpuType']; + } + + /** + * Sets supportKvmGpuType + * + * @param string|null $supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportKvmGpuType($supportKvmGpuType) + { + $this->container['supportKvmGpuType'] = $supportKvmGpuType; + return $this; + } + + /** + * Gets supportKvmInfiniband + * 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmInfiniband() + { + return $this->container['supportKvmInfiniband']; + } + + /** + * Sets supportKvmInfiniband + * + * @param string|null $supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return $this + */ + public function setSupportKvmInfiniband($supportKvmInfiniband) + { + $this->container['supportKvmInfiniband'] = $supportKvmInfiniband; + return $this; + } + + /** + * Gets supportLargememory + * 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return string|null + */ + public function getSupportLargememory() + { + return $this->container['supportLargememory']; + } + + /** + * Sets supportLargememory + * + * @param string|null $supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性 + * + * @return $this + */ + public function setSupportLargememory($supportLargememory) + { + $this->container['supportLargememory'] = $supportLargememory; + return $this; + } + + /** + * Gets supportXen + * 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportXen() + { + return $this->container['supportXen']; + } + + /** + * Sets supportXen + * + * @param string|null $supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportXen($supportXen) + { + $this->container['supportXen'] = $supportXen; + return $this; + } + + /** + * Gets supportXenGpuType + * 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenGpuType() + { + return $this->container['supportXenGpuType']; + } + + /** + * Sets supportXenGpuType + * + * @param string|null $supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,取值参考8.10-表 镜像支持的GPU类型说明。镜像操作系统类型请参考8.10-表 镜像类型。如果不支持XEN虚拟化下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenGpuType($supportXenGpuType) + { + $this->container['supportXenGpuType'] = $supportXenGpuType; + return $this; + } + + /** + * Gets supportXenHana + * 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenHana() + { + return $this->container['supportXenHana']; + } + + /** + * Sets supportXenHana + * + * @param string|null $supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenHana($supportXenHana) + { + $this->container['supportXenHana'] = $supportXenHana; + return $this; + } + + /** + * Gets checksum + * 目前暂时不使用。 + * + * @return string|null + */ + public function getChecksum() + { + return $this->container['checksum']; + } + + /** + * Sets checksum + * + * @param string|null $checksum 目前暂时不使用。 + * + * @return $this + */ + public function setChecksum($checksum) + { + $this->container['checksum'] = $checksum; + return $this; + } + + /** + * Gets containerFormat + * 容器类型。 + * + * @return string|null + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string|null $containerFormat 容器类型。 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets createdAt + * 创建时间。格式为UTC时间。 + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 创建时间。格式为UTC时间。 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets diskFormat + * 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets file + * 镜像文件下载和上传链接。 + * + * @return string|null + */ + public function getFile() + { + return $this->container['file']; + } + + /** + * Sets file + * + * @param string|null $file 镜像文件下载和上传链接。 + * + * @return $this + */ + public function setFile($file) + { + $this->container['file'] = $file; + return $this; + } + + /** + * Gets id + * 镜像ID。 + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 镜像ID。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘容量,单位为GB + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘容量,单位为GB + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行最小内存,单位为MB。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 镜像运行最小内存,单位为MB。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets owner + * 镜像属于哪个租户。 + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner 镜像属于哪个租户。 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets protected + * 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * + * @return bool|null + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool|null $protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false。 + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets schema + * 镜像视图。 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 镜像视图。 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Gets self + * 镜像链接信息。 + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self 镜像链接信息。 + * + * @return $this + */ + public function setSelf($self) + { + $this->container['self'] = $self; + return $this; + } + + /** + * Gets size + * 目前暂时不使用。 + * + * @return int|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size 目前暂时不使用。 + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待上传镜像文件。saving:表示镜像正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets tags + * 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表,提供用户可以自定义管理私有镜像的能力。用户可以通过镜像标签接口为每个镜像增加不同的标签,在查询接口中可以根据标签进行过滤。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets updatedAt + * 更新时间。格式为UTC时间。 + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 更新时间。格式为UTC时间。 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets virtualEnvType + * 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * + * @return string|null + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string|null $virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。 + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets virtualSize + * 目前暂时不使用。 + * + * @return int|null + */ + public function getVirtualSize() + { + return $this->container['virtualSize']; + } + + /** + * Sets virtualSize + * + * @param int|null $virtualSize 目前暂时不使用。 + * + * @return $this + */ + public function setVirtualSize($virtualSize) + { + $this->container['virtualSize'] = $virtualSize; + return $this; + } + + /** + * Gets visibility + * 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string|null $visibility 是否被其他租户可见,取值如下:private:私有镜像public:公共镜像shared:共享镜像 + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets supportFcInject + * 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return string|null + */ + public function getSupportFcInject() + { + return $this->container['supportFcInject']; + } + + /** + * Sets supportFcInject + * + * @param string|null $supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return $this + */ + public function setSupportFcInject($supportFcInject) + { + $this->container['supportFcInject'] = $supportFcInject; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets hwFirmwareType + * 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return string|null + */ + public function getHwFirmwareType() + { + return $this->container['hwFirmwareType']; + } + + /** + * Sets hwFirmwareType + * + * @param string|null $hwFirmwareType 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return $this + */ + public function setHwFirmwareType($hwFirmwareType) + { + $this->container['hwFirmwareType'] = $hwFirmwareType; + return $this; + } + + /** + * Gets supportArm + * 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportArm() + { + return $this->container['supportArm']; + } + + /** + * Sets supportArm + * + * @param string|null $supportArm 是否为ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportArm($supportArm) + { + $this->container['supportArm'] = $supportArm; + return $this; + } + + /** + * Gets isOffshelved + * 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * + * @return string|null + */ + public function getIsOffshelved() + { + return $this->container['isOffshelved']; + } + + /** + * Sets isOffshelved + * + * @param string|null $isOffshelved 表示当前市场镜像是否下架。 true:已下架 false:未下架 + * + * @return $this + */ + public function setIsOffshelved($isOffshelved) + { + $this->container['isOffshelved'] = $isOffshelved; + return $this; + } + + /** + * Gets lazyloading + * 镜像是否支持延迟加载。取值为True或False。 + * + * @return string|null + */ + public function getLazyloading() + { + return $this->container['lazyloading']; + } + + /** + * Sets lazyloading + * + * @param string|null $lazyloading 镜像是否支持延迟加载。取值为True或False。 + * + * @return $this + */ + public function setLazyloading($lazyloading) + { + $this->container['lazyloading'] = $lazyloading; + return $this; + } + + /** + * Gets osFeatureList + * 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return string|null + */ + public function getOsFeatureList() + { + return $this->container['osFeatureList']; + } + + /** + * Sets osFeatureList + * + * @param string|null $osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return $this + */ + public function setOsFeatureList($osFeatureList) + { + $this->container['osFeatureList'] = $osFeatureList; + return $this; + } + + /** + * Gets rootOrigin + * 表示当前镜像来源是从外部导入。取值:file。 + * + * @return string|null + */ + public function getRootOrigin() + { + return $this->container['rootOrigin']; + } + + /** + * Sets rootOrigin + * + * @param string|null $rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * + * @return $this + */ + public function setRootOrigin($rootOrigin) + { + $this->container['rootOrigin'] = $rootOrigin; + return $this; + } + + /** + * Gets sequenceNum + * 目前暂时不用 + * + * @return string|null + */ + public function getSequenceNum() + { + return $this->container['sequenceNum']; + } + + /** + * Sets sequenceNum + * + * @param string|null $sequenceNum 目前暂时不用 + * + * @return $this + */ + public function setSequenceNum($sequenceNum) + { + $this->container['sequenceNum'] = $sequenceNum; + return $this; + } + + /** + * Gets supportAgentList + * 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return string|null + */ + public function getSupportAgentList() + { + return $this->container['supportAgentList']; + } + + /** + * Sets supportAgentList + * + * @param string|null $supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return $this + */ + public function setSupportAgentList($supportAgentList) + { + $this->container['supportAgentList'] = $supportAgentList; + return $this; + } + + /** + * Gets systemCmkid + * 加密镜像所使用的密钥ID。 + * + * @return string|null + */ + public function getSystemCmkid() + { + return $this->container['systemCmkid']; + } + + /** + * Sets systemCmkid + * + * @param string|null $systemCmkid 加密镜像所使用的密钥ID。 + * + * @return $this + */ + public function setSystemCmkid($systemCmkid) + { + $this->container['systemCmkid'] = $systemCmkid; + return $this; + } + + /** + * Gets activeAt + * 镜像状态变为正常的时间。 + * + * @return string|null + */ + public function getActiveAt() + { + return $this->container['activeAt']; + } + + /** + * Sets activeAt + * + * @param string|null $activeAt 镜像状态变为正常的时间。 + * + * @return $this + */ + public function setActiveAt($activeAt) + { + $this->container['activeAt'] = $activeAt; + return $this; + } + + /** + * Gets hwVifMultiqueueEnabled + * 镜像是否支持网卡多队列。取值为true或者false。 + * + * @return string|null + */ + public function getHwVifMultiqueueEnabled() + { + return $this->container['hwVifMultiqueueEnabled']; + } + + /** + * Sets hwVifMultiqueueEnabled + * + * @param string|null $hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为true或者false。 + * + * @return $this + */ + public function setHwVifMultiqueueEnabled($hwVifMultiqueueEnabled) + { + $this->container['hwVifMultiqueueEnabled'] = $hwVifMultiqueueEnabled; + return $this; + } + + /** + * Gets maxRam + * 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return string|null + */ + public function getMaxRam() + { + return $this->container['maxRam']; + } + + /** + * Sets maxRam + * + * @param string|null $maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return $this + */ + public function setMaxRam($maxRam) + { + $this->container['maxRam'] = $maxRam; + return $this; + } + + /** + * Gets imageLocation + * 镜像的存储位置。 + * + * @return string|null + */ + public function getImageLocation() + { + return $this->container['imageLocation']; + } + + /** + * Sets imageLocation + * + * @param string|null $imageLocation 镜像的存储位置。 + * + * @return $this + */ + public function setImageLocation($imageLocation) + { + $this->container['imageLocation'] = $imageLocation; + return $this; + } + + /** + * Gets isConfigInit + * 是否完成了初始化配置。取值为true或false + * + * @return string|null + */ + public function getIsConfigInit() + { + return $this->container['isConfigInit']; + } + + /** + * Sets isConfigInit + * + * @param string|null $isConfigInit 是否完成了初始化配置。取值为true或false + * + * @return $this + */ + public function setIsConfigInit($isConfigInit) + { + $this->container['isConfigInit'] = $isConfigInit; + return $this; + } + + /** + * Gets accountCode + * 收费镜像标识。 + * + * @return string|null + */ + public function getAccountCode() + { + return $this->container['accountCode']; + } + + /** + * Sets accountCode + * + * @param string|null $accountCode 收费镜像标识。 + * + * @return $this + */ + public function setAccountCode($accountCode) + { + $this->container['accountCode'] = $accountCode; + return $this; + } + + /** + * Gets supportAmd + * 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportAmd() + { + return $this->container['supportAmd']; + } + + /** + * Sets supportAmd + * + * @param string|null $supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportAmd($supportAmd) + { + $this->container['supportAmd'] = $supportAmd; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ImageInfo.php b/Services/Ims/V2/Model/ImageInfo.php new file mode 100755 index 0000000..0aa9e6e --- /dev/null +++ b/Services/Ims/V2/Model/ImageInfo.php @@ -0,0 +1,2681 @@ +,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'backupId' => 'string', + 'dataOrigin' => 'string', + 'description' => 'string', + 'imageSize' => 'string', + 'imageSourceType' => 'string', + 'imagetype' => 'string', + 'isregistered' => 'string', + 'originalimagename' => 'string', + 'osBit' => 'string', + 'osType' => 'string', + 'osVersion' => 'string', + 'platform' => 'string', + 'productcode' => 'string', + 'supportDiskintensive' => 'string', + 'supportHighperformance' => 'string', + 'supportKvm' => 'string', + 'supportKvmGpuType' => 'string', + 'supportKvmInfiniband' => 'string', + 'supportLargememory' => 'string', + 'supportXen' => 'string', + 'supportXenGpuType' => 'string', + 'supportXenHana' => 'string', + 'systemSupportMarket' => 'bool', + 'checksum' => 'string', + 'containerFormat' => 'string', + 'createdAt' => 'string', + 'diskFormat' => 'string', + 'enterpriseProjectId' => 'string', + 'file' => 'string', + 'id' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'protected' => 'bool', + 'schema' => 'string', + 'self' => 'string', + 'size' => 'int', + 'status' => 'string', + 'tags' => 'string[]', + 'updatedAt' => 'string', + 'virtualEnvType' => 'string', + 'virtualSize' => 'int', + 'visibility' => 'string', + 'supportFcInject' => 'string', + 'hwFirmwareType' => 'string', + 'supportArm' => 'string', + 'maxRam' => 'string', + 'systemCmkid' => 'string', + 'osFeatureList' => 'string', + 'accountCode' => 'string', + 'hwVifMultiqueueEnabled' => 'string', + 'isOffshelved' => 'string', + 'lazyloading' => 'string', + 'rootOrigin' => 'string', + 'sequenceNum' => 'string', + 'activeAt' => 'string', + 'supportAgentList' => 'string', + 'supportAmd' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'backupId' => null, + 'dataOrigin' => null, + 'description' => null, + 'imageSize' => null, + 'imageSourceType' => null, + 'imagetype' => null, + 'isregistered' => null, + 'originalimagename' => null, + 'osBit' => null, + 'osType' => null, + 'osVersion' => null, + 'platform' => null, + 'productcode' => null, + 'supportDiskintensive' => null, + 'supportHighperformance' => null, + 'supportKvm' => null, + 'supportKvmGpuType' => null, + 'supportKvmInfiniband' => null, + 'supportLargememory' => null, + 'supportXen' => null, + 'supportXenGpuType' => null, + 'supportXenHana' => null, + 'systemSupportMarket' => null, + 'checksum' => null, + 'containerFormat' => null, + 'createdAt' => null, + 'diskFormat' => null, + 'enterpriseProjectId' => null, + 'file' => null, + 'id' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'owner' => null, + 'protected' => null, + 'schema' => null, + 'self' => null, + 'size' => 'int32', + 'status' => null, + 'tags' => null, + 'updatedAt' => null, + 'virtualEnvType' => null, + 'virtualSize' => 'int32', + 'visibility' => null, + 'supportFcInject' => null, + 'hwFirmwareType' => null, + 'supportArm' => null, + 'maxRam' => null, + 'systemCmkid' => null, + 'osFeatureList' => null, + 'accountCode' => null, + 'hwVifMultiqueueEnabled' => null, + 'isOffshelved' => null, + 'lazyloading' => null, + 'rootOrigin' => null, + 'sequenceNum' => null, + 'activeAt' => null, + 'supportAgentList' => null, + 'supportAmd' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'backupId' => '__backup_id', + 'dataOrigin' => '__data_origin', + 'description' => '__description', + 'imageSize' => '__image_size', + 'imageSourceType' => '__image_source_type', + 'imagetype' => '__imagetype', + 'isregistered' => '__isregistered', + 'originalimagename' => '__originalimagename', + 'osBit' => '__os_bit', + 'osType' => '__os_type', + 'osVersion' => '__os_version', + 'platform' => '__platform', + 'productcode' => '__productcode', + 'supportDiskintensive' => '__support_diskintensive', + 'supportHighperformance' => '__support_highperformance', + 'supportKvm' => '__support_kvm', + 'supportKvmGpuType' => '__support_kvm_gpu_type', + 'supportKvmInfiniband' => '__support_kvm_infiniband', + 'supportLargememory' => '__support_largememory', + 'supportXen' => '__support_xen', + 'supportXenGpuType' => '__support_xen_gpu_type', + 'supportXenHana' => '__support_xen_hana', + 'systemSupportMarket' => '__system_support_market', + 'checksum' => 'checksum', + 'containerFormat' => 'container_format', + 'createdAt' => 'created_at', + 'diskFormat' => 'disk_format', + 'enterpriseProjectId' => 'enterprise_project_id', + 'file' => 'file', + 'id' => 'id', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'owner' => 'owner', + 'protected' => 'protected', + 'schema' => 'schema', + 'self' => 'self', + 'size' => 'size', + 'status' => 'status', + 'tags' => 'tags', + 'updatedAt' => 'updated_at', + 'virtualEnvType' => 'virtual_env_type', + 'virtualSize' => 'virtual_size', + 'visibility' => 'visibility', + 'supportFcInject' => '__support_fc_inject', + 'hwFirmwareType' => 'hw_firmware_type', + 'supportArm' => '__support_arm', + 'maxRam' => 'max_ram', + 'systemCmkid' => '__system__cmkid', + 'osFeatureList' => '__os_feature_list', + 'accountCode' => '__account_code', + 'hwVifMultiqueueEnabled' => 'hw_vif_multiqueue_enabled', + 'isOffshelved' => '__is_offshelved', + 'lazyloading' => '__lazyloading', + 'rootOrigin' => '__root_origin', + 'sequenceNum' => '__sequence_num', + 'activeAt' => 'active_at', + 'supportAgentList' => '__support_agent_list', + 'supportAmd' => '__support_amd' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $setters = [ + 'backupId' => 'setBackupId', + 'dataOrigin' => 'setDataOrigin', + 'description' => 'setDescription', + 'imageSize' => 'setImageSize', + 'imageSourceType' => 'setImageSourceType', + 'imagetype' => 'setImagetype', + 'isregistered' => 'setIsregistered', + 'originalimagename' => 'setOriginalimagename', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType', + 'osVersion' => 'setOsVersion', + 'platform' => 'setPlatform', + 'productcode' => 'setProductcode', + 'supportDiskintensive' => 'setSupportDiskintensive', + 'supportHighperformance' => 'setSupportHighperformance', + 'supportKvm' => 'setSupportKvm', + 'supportKvmGpuType' => 'setSupportKvmGpuType', + 'supportKvmInfiniband' => 'setSupportKvmInfiniband', + 'supportLargememory' => 'setSupportLargememory', + 'supportXen' => 'setSupportXen', + 'supportXenGpuType' => 'setSupportXenGpuType', + 'supportXenHana' => 'setSupportXenHana', + 'systemSupportMarket' => 'setSystemSupportMarket', + 'checksum' => 'setChecksum', + 'containerFormat' => 'setContainerFormat', + 'createdAt' => 'setCreatedAt', + 'diskFormat' => 'setDiskFormat', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'file' => 'setFile', + 'id' => 'setId', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'owner' => 'setOwner', + 'protected' => 'setProtected', + 'schema' => 'setSchema', + 'self' => 'setSelf', + 'size' => 'setSize', + 'status' => 'setStatus', + 'tags' => 'setTags', + 'updatedAt' => 'setUpdatedAt', + 'virtualEnvType' => 'setVirtualEnvType', + 'virtualSize' => 'setVirtualSize', + 'visibility' => 'setVisibility', + 'supportFcInject' => 'setSupportFcInject', + 'hwFirmwareType' => 'setHwFirmwareType', + 'supportArm' => 'setSupportArm', + 'maxRam' => 'setMaxRam', + 'systemCmkid' => 'setSystemCmkid', + 'osFeatureList' => 'setOsFeatureList', + 'accountCode' => 'setAccountCode', + 'hwVifMultiqueueEnabled' => 'setHwVifMultiqueueEnabled', + 'isOffshelved' => 'setIsOffshelved', + 'lazyloading' => 'setLazyloading', + 'rootOrigin' => 'setRootOrigin', + 'sequenceNum' => 'setSequenceNum', + 'activeAt' => 'setActiveAt', + 'supportAgentList' => 'setSupportAgentList', + 'supportAmd' => 'setSupportAmd' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $getters = [ + 'backupId' => 'getBackupId', + 'dataOrigin' => 'getDataOrigin', + 'description' => 'getDescription', + 'imageSize' => 'getImageSize', + 'imageSourceType' => 'getImageSourceType', + 'imagetype' => 'getImagetype', + 'isregistered' => 'getIsregistered', + 'originalimagename' => 'getOriginalimagename', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType', + 'osVersion' => 'getOsVersion', + 'platform' => 'getPlatform', + 'productcode' => 'getProductcode', + 'supportDiskintensive' => 'getSupportDiskintensive', + 'supportHighperformance' => 'getSupportHighperformance', + 'supportKvm' => 'getSupportKvm', + 'supportKvmGpuType' => 'getSupportKvmGpuType', + 'supportKvmInfiniband' => 'getSupportKvmInfiniband', + 'supportLargememory' => 'getSupportLargememory', + 'supportXen' => 'getSupportXen', + 'supportXenGpuType' => 'getSupportXenGpuType', + 'supportXenHana' => 'getSupportXenHana', + 'systemSupportMarket' => 'getSystemSupportMarket', + 'checksum' => 'getChecksum', + 'containerFormat' => 'getContainerFormat', + 'createdAt' => 'getCreatedAt', + 'diskFormat' => 'getDiskFormat', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'file' => 'getFile', + 'id' => 'getId', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'owner' => 'getOwner', + 'protected' => 'getProtected', + 'schema' => 'getSchema', + 'self' => 'getSelf', + 'size' => 'getSize', + 'status' => 'getStatus', + 'tags' => 'getTags', + 'updatedAt' => 'getUpdatedAt', + 'virtualEnvType' => 'getVirtualEnvType', + 'virtualSize' => 'getVirtualSize', + 'visibility' => 'getVisibility', + 'supportFcInject' => 'getSupportFcInject', + 'hwFirmwareType' => 'getHwFirmwareType', + 'supportArm' => 'getSupportArm', + 'maxRam' => 'getMaxRam', + 'systemCmkid' => 'getSystemCmkid', + 'osFeatureList' => 'getOsFeatureList', + 'accountCode' => 'getAccountCode', + 'hwVifMultiqueueEnabled' => 'getHwVifMultiqueueEnabled', + 'isOffshelved' => 'getIsOffshelved', + 'lazyloading' => 'getLazyloading', + 'rootOrigin' => 'getRootOrigin', + 'sequenceNum' => 'getSequenceNum', + 'activeAt' => 'getActiveAt', + 'supportAgentList' => 'getSupportAgentList', + 'supportAmd' => 'getSupportAmd' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGE_SOURCE_TYPE_UDS = 'uds'; + const IMAGE_SOURCE_TYPE_SWIFT = 'swift'; + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const ISREGISTERED_TRUE = 'true'; + const ISREGISTERED_FALSE = 'false'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const PLATFORM_WINDOWS = 'Windows'; + const PLATFORM_UBUNTU = 'Ubuntu'; + const PLATFORM_RED_HAT = 'RedHat'; + const PLATFORM_SUSE = 'SUSE'; + const PLATFORM_CENT_OS = 'CentOS'; + const PLATFORM_DEBIAN = 'Debian'; + const PLATFORM_OPEN_SUSE = 'OpenSUSE'; + const PLATFORM_ORACLE_LINUX = 'Oracle Linux'; + const PLATFORM_FEDORA = 'Fedora'; + const PLATFORM_OTHER = 'Other'; + const PLATFORM_CORE_OS = 'CoreOS'; + const PLATFORM_EULER_OS = 'EulerOS'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + const VISIBILITY__PRIVATE = 'private'; + const VISIBILITY__PUBLIC = 'public'; + const SUPPORT_FC_INJECT_TRUE = 'true'; + const SUPPORT_FC_INJECT_FALSE = 'false'; + const HW_FIRMWARE_TYPE_BIOS = 'bios'; + const HW_FIRMWARE_TYPE_UEFI = 'uefi'; + const SUPPORT_ARM_TRUE = 'true'; + const SUPPORT_ARM_FALSE = 'false'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImageSourceTypeAllowableValues() + { + return [ + self::IMAGE_SOURCE_TYPE_UDS, + self::IMAGE_SOURCE_TYPE_SWIFT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsregisteredAllowableValues() + { + return [ + self::ISREGISTERED_TRUE, + self::ISREGISTERED_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_WINDOWS, + self::PLATFORM_UBUNTU, + self::PLATFORM_RED_HAT, + self::PLATFORM_SUSE, + self::PLATFORM_CENT_OS, + self::PLATFORM_DEBIAN, + self::PLATFORM_OPEN_SUSE, + self::PLATFORM_ORACLE_LINUX, + self::PLATFORM_FEDORA, + self::PLATFORM_OTHER, + self::PLATFORM_CORE_OS, + self::PLATFORM_EULER_OS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVisibilityAllowableValues() + { + return [ + self::VISIBILITY__PRIVATE, + self::VISIBILITY__PUBLIC, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportFcInjectAllowableValues() + { + return [ + self::SUPPORT_FC_INJECT_TRUE, + self::SUPPORT_FC_INJECT_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHwFirmwareTypeAllowableValues() + { + return [ + self::HW_FIRMWARE_TYPE_BIOS, + self::HW_FIRMWARE_TYPE_UEFI, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportArmAllowableValues() + { + return [ + self::SUPPORT_ARM_TRUE, + self::SUPPORT_ARM_FALSE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['backupId'] = isset($data['backupId']) ? $data['backupId'] : null; + $this->container['dataOrigin'] = isset($data['dataOrigin']) ? $data['dataOrigin'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['imageSize'] = isset($data['imageSize']) ? $data['imageSize'] : null; + $this->container['imageSourceType'] = isset($data['imageSourceType']) ? $data['imageSourceType'] : null; + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : null; + $this->container['originalimagename'] = isset($data['originalimagename']) ? $data['originalimagename'] : null; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['productcode'] = isset($data['productcode']) ? $data['productcode'] : null; + $this->container['supportDiskintensive'] = isset($data['supportDiskintensive']) ? $data['supportDiskintensive'] : null; + $this->container['supportHighperformance'] = isset($data['supportHighperformance']) ? $data['supportHighperformance'] : null; + $this->container['supportKvm'] = isset($data['supportKvm']) ? $data['supportKvm'] : null; + $this->container['supportKvmGpuType'] = isset($data['supportKvmGpuType']) ? $data['supportKvmGpuType'] : null; + $this->container['supportKvmInfiniband'] = isset($data['supportKvmInfiniband']) ? $data['supportKvmInfiniband'] : null; + $this->container['supportLargememory'] = isset($data['supportLargememory']) ? $data['supportLargememory'] : null; + $this->container['supportXen'] = isset($data['supportXen']) ? $data['supportXen'] : null; + $this->container['supportXenGpuType'] = isset($data['supportXenGpuType']) ? $data['supportXenGpuType'] : null; + $this->container['supportXenHana'] = isset($data['supportXenHana']) ? $data['supportXenHana'] : null; + $this->container['systemSupportMarket'] = isset($data['systemSupportMarket']) ? $data['systemSupportMarket'] : null; + $this->container['checksum'] = isset($data['checksum']) ? $data['checksum'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['file'] = isset($data['file']) ? $data['file'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + $this->container['self'] = isset($data['self']) ? $data['self'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['virtualSize'] = isset($data['virtualSize']) ? $data['virtualSize'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['supportFcInject'] = isset($data['supportFcInject']) ? $data['supportFcInject'] : null; + $this->container['hwFirmwareType'] = isset($data['hwFirmwareType']) ? $data['hwFirmwareType'] : null; + $this->container['supportArm'] = isset($data['supportArm']) ? $data['supportArm'] : null; + $this->container['maxRam'] = isset($data['maxRam']) ? $data['maxRam'] : null; + $this->container['systemCmkid'] = isset($data['systemCmkid']) ? $data['systemCmkid'] : null; + $this->container['osFeatureList'] = isset($data['osFeatureList']) ? $data['osFeatureList'] : null; + $this->container['accountCode'] = isset($data['accountCode']) ? $data['accountCode'] : null; + $this->container['hwVifMultiqueueEnabled'] = isset($data['hwVifMultiqueueEnabled']) ? $data['hwVifMultiqueueEnabled'] : null; + $this->container['isOffshelved'] = isset($data['isOffshelved']) ? $data['isOffshelved'] : null; + $this->container['lazyloading'] = isset($data['lazyloading']) ? $data['lazyloading'] : null; + $this->container['rootOrigin'] = isset($data['rootOrigin']) ? $data['rootOrigin'] : null; + $this->container['sequenceNum'] = isset($data['sequenceNum']) ? $data['sequenceNum'] : null; + $this->container['activeAt'] = isset($data['activeAt']) ? $data['activeAt'] : null; + $this->container['supportAgentList'] = isset($data['supportAgentList']) ? $data['supportAgentList'] : null; + $this->container['supportAmd'] = isset($data['supportAmd']) ? $data['supportAmd'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + if ($this->container['imageSize'] === null) { + $invalidProperties[] = "'imageSize' can't be null"; + } + if ($this->container['imageSourceType'] === null) { + $invalidProperties[] = "'imageSourceType' can't be null"; + } + $allowedValues = $this->getImageSourceTypeAllowableValues(); + if (!is_null($this->container['imageSourceType']) && !in_array($this->container['imageSourceType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imageSourceType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['imagetype'] === null) { + $invalidProperties[] = "'imagetype' can't be null"; + } + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['isregistered'] === null) { + $invalidProperties[] = "'isregistered' can't be null"; + } + $allowedValues = $this->getIsregisteredAllowableValues(); + if (!is_null($this->container['isregistered']) && !in_array($this->container['isregistered'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isregistered', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['osType'] === null) { + $invalidProperties[] = "'osType' can't be null"; + } + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'platform', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['containerFormat'] === null) { + $invalidProperties[] = "'containerFormat' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['minDisk'] === null) { + $invalidProperties[] = "'minDisk' can't be null"; + } + if (($this->container['minDisk'] > 1024)) { + $invalidProperties[] = "invalid value for 'minDisk', must be smaller than or equal to 1024."; + } + if (($this->container['minDisk'] < 40)) { + $invalidProperties[] = "invalid value for 'minDisk', must be bigger than or equal to 40."; + } + if ($this->container['minRam'] === null) { + $invalidProperties[] = "'minRam' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 128)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 128."; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + if ($this->container['protected'] === null) { + $invalidProperties[] = "'protected' can't be null"; + } + if ($this->container['self'] === null) { + $invalidProperties[] = "'self' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } + if ($this->container['virtualEnvType'] === null) { + $invalidProperties[] = "'virtualEnvType' can't be null"; + } + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['visibility'] === null) { + $invalidProperties[] = "'visibility' can't be null"; + } + $allowedValues = $this->getVisibilityAllowableValues(); + if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'visibility', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportFcInjectAllowableValues(); + if (!is_null($this->container['supportFcInject']) && !in_array($this->container['supportFcInject'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportFcInject', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getHwFirmwareTypeAllowableValues(); + if (!is_null($this->container['hwFirmwareType']) && !in_array($this->container['hwFirmwareType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'hwFirmwareType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportArmAllowableValues(); + if (!is_null($this->container['supportArm']) && !in_array($this->container['supportArm'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportArm', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['activeAt'] === null) { + $invalidProperties[] = "'activeAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets backupId + * 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * + * @return string|null + */ + public function getBackupId() + { + return $this->container['backupId']; + } + + /** + * Sets backupId + * + * @param string|null $backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * + * @return $this + */ + public function setBackupId($backupId) + { + $this->container['backupId'] = $backupId; + return $this; + } + + /** + * Gets dataOrigin + * 镜像来源。公共镜像为空 + * + * @return string|null + */ + public function getDataOrigin() + { + return $this->container['dataOrigin']; + } + + /** + * Sets dataOrigin + * + * @param string|null $dataOrigin 镜像来源。公共镜像为空 + * + * @return $this + */ + public function setDataOrigin($dataOrigin) + { + $this->container['dataOrigin'] = $dataOrigin; + return $this; + } + + /** + * Gets description + * 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets imageSize + * 镜像文件的大小,单位为字节 + * + * @return string + */ + public function getImageSize() + { + return $this->container['imageSize']; + } + + /** + * Sets imageSize + * + * @param string $imageSize 镜像文件的大小,单位为字节 + * + * @return $this + */ + public function setImageSize($imageSize) + { + $this->container['imageSize'] = $imageSize; + return $this; + } + + /** + * Gets imageSourceType + * 镜像后端存储类型,目前只支持uds + * + * @return string + */ + public function getImageSourceType() + { + return $this->container['imageSourceType']; + } + + /** + * Sets imageSourceType + * + * @param string $imageSourceType 镜像后端存储类型,目前只支持uds + * + * @return $this + */ + public function setImageSourceType($imageSourceType) + { + $this->container['imageSourceType'] = $imageSourceType; + return $this; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * + * @return string + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string $imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets isregistered + * 是否是注册过的镜像,取值为“true”或者“false” + * + * @return string + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param string $isregistered 是否是注册过的镜像,取值为“true”或者“false” + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets originalimagename + * 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * + * @return string|null + */ + public function getOriginalimagename() + { + return $this->container['originalimagename']; + } + + /** + * Sets originalimagename + * + * @param string|null $originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * + * @return $this + */ + public function setOriginalimagename($originalimagename) + { + $this->container['originalimagename'] = $originalimagename; + return $this; + } + + /** + * Gets osBit + * 操作系统位数,一般取值为“32”或者“64” + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 操作系统位数,一般取值为“32”或者“64” + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 操作系统类型,目前取值Linux, Windows,Other + * + * @return string + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string $osType 操作系统类型,目前取值Linux, Windows,Other + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets osVersion + * 操作系统具体版本 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 操作系统具体版本 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets platform + * 镜像平台分类 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets productcode + * 市场镜像的产品ID + * + * @return string|null + */ + public function getProductcode() + { + return $this->container['productcode']; + } + + /** + * Sets productcode + * + * @param string|null $productcode 市场镜像的产品ID + * + * @return $this + */ + public function setProductcode($productcode) + { + $this->container['productcode'] = $productcode; + return $this; + } + + /** + * Gets supportDiskintensive + * 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportDiskintensive() + { + return $this->container['supportDiskintensive']; + } + + /** + * Sets supportDiskintensive + * + * @param string|null $supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportDiskintensive($supportDiskintensive) + { + $this->container['supportDiskintensive'] = $supportDiskintensive; + return $this; + } + + /** + * Gets supportHighperformance + * 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportHighperformance() + { + return $this->container['supportHighperformance']; + } + + /** + * Sets supportHighperformance + * + * @param string|null $supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportHighperformance($supportHighperformance) + { + $this->container['supportHighperformance'] = $supportHighperformance; + return $this; + } + + /** + * Gets supportKvm + * 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportKvm() + { + return $this->container['supportKvm']; + } + + /** + * Sets supportKvm + * + * @param string|null $supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportKvm($supportKvm) + { + $this->container['supportKvm'] = $supportKvm; + return $this; + } + + /** + * Gets supportKvmGpuType + * 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmGpuType() + { + return $this->container['supportKvmGpuType']; + } + + /** + * Sets supportKvmGpuType + * + * @param string|null $supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportKvmGpuType($supportKvmGpuType) + { + $this->container['supportKvmGpuType'] = $supportKvmGpuType; + return $this; + } + + /** + * Gets supportKvmInfiniband + * 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmInfiniband() + { + return $this->container['supportKvmInfiniband']; + } + + /** + * Sets supportKvmInfiniband + * + * @param string|null $supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return $this + */ + public function setSupportKvmInfiniband($supportKvmInfiniband) + { + $this->container['supportKvmInfiniband'] = $supportKvmInfiniband; + return $this; + } + + /** + * Gets supportLargememory + * 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportLargememory() + { + return $this->container['supportLargememory']; + } + + /** + * Sets supportLargememory + * + * @param string|null $supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportLargememory($supportLargememory) + { + $this->container['supportLargememory'] = $supportLargememory; + return $this; + } + + /** + * Gets supportXen + * 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportXen() + { + return $this->container['supportXen']; + } + + /** + * Sets supportXen + * + * @param string|null $supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportXen($supportXen) + { + $this->container['supportXen'] = $supportXen; + return $this; + } + + /** + * Gets supportXenGpuType + * 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenGpuType() + { + return $this->container['supportXenGpuType']; + } + + /** + * Sets supportXenGpuType + * + * @param string|null $supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenGpuType($supportXenGpuType) + { + $this->container['supportXenGpuType'] = $supportXenGpuType; + return $this; + } + + /** + * Gets supportXenHana + * 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenHana() + { + return $this->container['supportXenHana']; + } + + /** + * Sets supportXenHana + * + * @param string|null $supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenHana($supportXenHana) + { + $this->container['supportXenHana'] = $supportXenHana; + return $this; + } + + /** + * Gets systemSupportMarket + * 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * + * @return bool|null + */ + public function getSystemSupportMarket() + { + return $this->container['systemSupportMarket']; + } + + /** + * Sets systemSupportMarket + * + * @param bool|null $systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * + * @return $this + */ + public function setSystemSupportMarket($systemSupportMarket) + { + $this->container['systemSupportMarket'] = $systemSupportMarket; + return $this; + } + + /** + * Gets checksum + * 目前暂时不使用 + * + * @return string|null + */ + public function getChecksum() + { + return $this->container['checksum']; + } + + /** + * Sets checksum + * + * @param string|null $checksum 目前暂时不使用 + * + * @return $this + */ + public function setChecksum($checksum) + { + $this->container['checksum'] = $checksum; + return $this; + } + + /** + * Gets containerFormat + * 容器类型 + * + * @return string + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string $containerFormat 容器类型 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets createdAt + * 创建时间。格式为UTC时间 + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt 创建时间。格式为UTC时间 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets diskFormat + * 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets file + * 镜像文件下载和上传链接 + * + * @return string|null + */ + public function getFile() + { + return $this->container['file']; + } + + /** + * Sets file + * + * @param string|null $file 镜像文件下载和上传链接 + * + * @return $this + */ + public function setFile($file) + { + $this->container['file'] = $file; + return $this; + } + + /** + * Gets id + * 镜像ID + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 镜像ID + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * + * @return int + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int $minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * + * @return int + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int $minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets owner + * 镜像属于哪个租户 + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner 镜像属于哪个租户 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets protected + * 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * + * @return bool + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool $protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets schema + * 镜像视图 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 镜像视图 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Gets self + * 镜像链接信息 + * + * @return string + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string $self 镜像链接信息 + * + * @return $this + */ + public function setSelf($self) + { + $this->container['self'] = $self; + return $this; + } + + /** + * Gets size + * 目前暂时不使用 + * + * @return int|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size 目前暂时不使用 + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets tags + * 镜像标签列表 + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags 镜像标签列表 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets updatedAt + * 更新时间。格式为UTC时间 + * + * @return string + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string $updatedAt 更新时间。格式为UTC时间 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets virtualEnvType + * 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * + * @return string + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string $virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets virtualSize + * 目前暂时不使用 + * + * @return int|null + */ + public function getVirtualSize() + { + return $this->container['virtualSize']; + } + + /** + * Sets virtualSize + * + * @param int|null $virtualSize 目前暂时不使用 + * + * @return $this + */ + public function setVirtualSize($virtualSize) + { + $this->container['virtualSize'] = $virtualSize; + return $this; + } + + /** + * Gets visibility + * 是否被其他租户可见,取值为private或public + * + * @return string + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string $visibility 是否被其他租户可见,取值为private或public + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets supportFcInject + * 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return string|null + */ + public function getSupportFcInject() + { + return $this->container['supportFcInject']; + } + + /** + * Sets supportFcInject + * + * @param string|null $supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return $this + */ + public function setSupportFcInject($supportFcInject) + { + $this->container['supportFcInject'] = $supportFcInject; + return $this; + } + + /** + * Gets hwFirmwareType + * 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return string|null + */ + public function getHwFirmwareType() + { + return $this->container['hwFirmwareType']; + } + + /** + * Sets hwFirmwareType + * + * @param string|null $hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return $this + */ + public function setHwFirmwareType($hwFirmwareType) + { + $this->container['hwFirmwareType'] = $hwFirmwareType; + return $this; + } + + /** + * Gets supportArm + * 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportArm() + { + return $this->container['supportArm']; + } + + /** + * Sets supportArm + * + * @param string|null $supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportArm($supportArm) + { + $this->container['supportArm'] = $supportArm; + return $this; + } + + /** + * Gets maxRam + * 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return string|null + */ + public function getMaxRam() + { + return $this->container['maxRam']; + } + + /** + * Sets maxRam + * + * @param string|null $maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return $this + */ + public function setMaxRam($maxRam) + { + $this->container['maxRam'] = $maxRam; + return $this; + } + + /** + * Gets systemCmkid + * 加密镜像所使用的密钥ID。 + * + * @return string|null + */ + public function getSystemCmkid() + { + return $this->container['systemCmkid']; + } + + /** + * Sets systemCmkid + * + * @param string|null $systemCmkid 加密镜像所使用的密钥ID。 + * + * @return $this + */ + public function setSystemCmkid($systemCmkid) + { + $this->container['systemCmkid'] = $systemCmkid; + return $this; + } + + /** + * Gets osFeatureList + * 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return string|null + */ + public function getOsFeatureList() + { + return $this->container['osFeatureList']; + } + + /** + * Sets osFeatureList + * + * @param string|null $osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return $this + */ + public function setOsFeatureList($osFeatureList) + { + $this->container['osFeatureList'] = $osFeatureList; + return $this; + } + + /** + * Gets accountCode + * 收费镜像标识。 + * + * @return string|null + */ + public function getAccountCode() + { + return $this->container['accountCode']; + } + + /** + * Sets accountCode + * + * @param string|null $accountCode 收费镜像标识。 + * + * @return $this + */ + public function setAccountCode($accountCode) + { + $this->container['accountCode'] = $accountCode; + return $this; + } + + /** + * Gets hwVifMultiqueueEnabled + * 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * + * @return string|null + */ + public function getHwVifMultiqueueEnabled() + { + return $this->container['hwVifMultiqueueEnabled']; + } + + /** + * Sets hwVifMultiqueueEnabled + * + * @param string|null $hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * + * @return $this + */ + public function setHwVifMultiqueueEnabled($hwVifMultiqueueEnabled) + { + $this->container['hwVifMultiqueueEnabled'] = $hwVifMultiqueueEnabled; + return $this; + } + + /** + * Gets isOffshelved + * 表示当前市场镜像是否下架。true:已下架 false:未下架 + * + * @return string|null + */ + public function getIsOffshelved() + { + return $this->container['isOffshelved']; + } + + /** + * Sets isOffshelved + * + * @param string|null $isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * + * @return $this + */ + public function setIsOffshelved($isOffshelved) + { + $this->container['isOffshelved'] = $isOffshelved; + return $this; + } + + /** + * Gets lazyloading + * 镜像是否支持延迟加载。取值为“True”或“False”。 + * + * @return string|null + */ + public function getLazyloading() + { + return $this->container['lazyloading']; + } + + /** + * Sets lazyloading + * + * @param string|null $lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * + * @return $this + */ + public function setLazyloading($lazyloading) + { + $this->container['lazyloading'] = $lazyloading; + return $this; + } + + /** + * Gets rootOrigin + * 表示当前镜像来源是从外部导入。取值:file。 + * + * @return string|null + */ + public function getRootOrigin() + { + return $this->container['rootOrigin']; + } + + /** + * Sets rootOrigin + * + * @param string|null $rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * + * @return $this + */ + public function setRootOrigin($rootOrigin) + { + $this->container['rootOrigin'] = $rootOrigin; + return $this; + } + + /** + * Gets sequenceNum + * 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * + * @return string|null + */ + public function getSequenceNum() + { + return $this->container['sequenceNum']; + } + + /** + * Sets sequenceNum + * + * @param string|null $sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * + * @return $this + */ + public function setSequenceNum($sequenceNum) + { + $this->container['sequenceNum'] = $sequenceNum; + return $this; + } + + /** + * Gets activeAt + * 镜像状态变为正常的时间。 + * + * @return string + */ + public function getActiveAt() + { + return $this->container['activeAt']; + } + + /** + * Sets activeAt + * + * @param string $activeAt 镜像状态变为正常的时间。 + * + * @return $this + */ + public function setActiveAt($activeAt) + { + $this->container['activeAt'] = $activeAt; + return $this; + } + + /** + * Gets supportAgentList + * 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return string|null + */ + public function getSupportAgentList() + { + return $this->container['supportAgentList']; + } + + /** + * Sets supportAgentList + * + * @param string|null $supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return $this + */ + public function setSupportAgentList($supportAgentList) + { + $this->container['supportAgentList'] = $supportAgentList; + return $this; + } + + /** + * Gets supportAmd + * 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportAmd() + { + return $this->container['supportAmd']; + } + + /** + * Sets supportAmd + * + * @param string|null $supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportAmd($supportAmd) + { + $this->container['supportAmd'] = $supportAmd; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ImageTag.php b/Services/Ims/V2/Model/ImageTag.php new file mode 100755 index 0000000..85ecc10 --- /dev/null +++ b/Services/Ims/V2/Model/ImageTag.php @@ -0,0 +1,300 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 标签key值 + * value 标签value值 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 标签key值 + * value 标签value值 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 标签key值 + * value 标签value值 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 标签key值 + * value 标签value值 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 标签key值 + * + * @return string|null + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string|null $key 标签key值 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets value + * 标签value值 + * + * @return string|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value 标签value值 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ImportImageQuickRequest.php b/Services/Ims/V2/Model/ImportImageQuickRequest.php new file mode 100755 index 0000000..e8d20d9 --- /dev/null +++ b/Services/Ims/V2/Model/ImportImageQuickRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\QuickImportImageByFileRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\QuickImportImageByFileRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\QuickImportImageByFileRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ImportImageQuickResponse.php b/Services/Ims/V2/Model/ImportImageQuickResponse.php new file mode 100755 index 0000000..200dba0 --- /dev/null +++ b/Services/Ims/V2/Model/ImportImageQuickResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/JobEntities.php b/Services/Ims/V2/Model/JobEntities.php new file mode 100755 index 0000000..29a74bb --- /dev/null +++ b/Services/Ims/V2/Model/JobEntities.php @@ -0,0 +1,405 @@ + 'string', + 'currentTask' => 'string', + 'imageName' => 'string', + 'processPercent' => 'double', + 'results' => '\G42Cloud\SDK\Ims\V2\Model\JobEntitiesResult[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * results 批量任务执行结果 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'currentTask' => null, + 'imageName' => null, + 'processPercent' => 'double', + 'results' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * results 批量任务执行结果 + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'currentTask' => 'current_task', + 'imageName' => 'image_name', + 'processPercent' => 'process_percent', + 'results' => 'results' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * results 批量任务执行结果 + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'currentTask' => 'setCurrentTask', + 'imageName' => 'setImageName', + 'processPercent' => 'setProcessPercent', + 'results' => 'setResults' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * results 批量任务执行结果 + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'currentTask' => 'getCurrentTask', + 'imageName' => 'getImageName', + 'processPercent' => 'getProcessPercent', + 'results' => 'getResults' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['currentTask'] = isset($data['currentTask']) ? $data['currentTask'] : null; + $this->container['imageName'] = isset($data['imageName']) ? $data['imageName'] : null; + $this->container['processPercent'] = isset($data['processPercent']) ? $data['processPercent'] : null; + $this->container['results'] = isset($data['results']) ? $data['results'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string|null + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string|null $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets currentTask + * 当前任务名称 + * + * @return string|null + */ + public function getCurrentTask() + { + return $this->container['currentTask']; + } + + /** + * Sets currentTask + * + * @param string|null $currentTask 当前任务名称 + * + * @return $this + */ + public function setCurrentTask($currentTask) + { + $this->container['currentTask'] = $currentTask; + return $this; + } + + /** + * Gets imageName + * 镜像名称 + * + * @return string|null + */ + public function getImageName() + { + return $this->container['imageName']; + } + + /** + * Sets imageName + * + * @param string|null $imageName 镜像名称 + * + * @return $this + */ + public function setImageName($imageName) + { + $this->container['imageName'] = $imageName; + return $this; + } + + /** + * Gets processPercent + * 任务执行进度 + * + * @return double|null + */ + public function getProcessPercent() + { + return $this->container['processPercent']; + } + + /** + * Sets processPercent + * + * @param double|null $processPercent 任务执行进度 + * + * @return $this + */ + public function setProcessPercent($processPercent) + { + $this->container['processPercent'] = $processPercent; + return $this; + } + + /** + * Gets results + * 批量任务执行结果 + * + * @return \G42Cloud\SDK\Ims\V2\Model\JobEntitiesResult[]|null + */ + public function getResults() + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param \G42Cloud\SDK\Ims\V2\Model\JobEntitiesResult[]|null $results 批量任务执行结果 + * + * @return $this + */ + public function setResults($results) + { + $this->container['results'] = $results; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/JobEntitiesResult.php b/Services/Ims/V2/Model/JobEntitiesResult.php new file mode 100755 index 0000000..93afb42 --- /dev/null +++ b/Services/Ims/V2/Model/JobEntitiesResult.php @@ -0,0 +1,335 @@ + 'string', + 'projectId' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 + * projectId 项目ID。 + * status 任务状态。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'projectId' => null, + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 + * projectId 项目ID。 + * status 任务状态。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'projectId' => 'project_id', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 + * projectId 项目ID。 + * status 任务状态。 + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'projectId' => 'setProjectId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 + * projectId 项目ID。 + * status 任务状态。 + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'projectId' => 'getProjectId', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['projectId'] = isset($data['projectId']) ? $data['projectId'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string|null + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string|null $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets projectId + * 项目ID。 + * + * @return string|null + */ + public function getProjectId() + { + return $this->container['projectId']; + } + + /** + * Sets projectId + * + * @param string|null $projectId 项目ID。 + * + * @return $this + */ + public function setProjectId($projectId) + { + $this->container['projectId'] = $projectId; + return $this; + } + + /** + * Gets status + * 任务状态。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 任务状态。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/JobProgressEntities.php b/Services/Ims/V2/Model/JobProgressEntities.php new file mode 100755 index 0000000..157f88f --- /dev/null +++ b/Services/Ims/V2/Model/JobProgressEntities.php @@ -0,0 +1,405 @@ + 'string', + 'currentTask' => 'string', + 'imageName' => 'string', + 'processPercent' => 'double', + 'subJobId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * subJobId 子任务ID + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'currentTask' => null, + 'imageName' => null, + 'processPercent' => 'double', + 'subJobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * subJobId 子任务ID + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'currentTask' => 'current_task', + 'imageName' => 'image_name', + 'processPercent' => 'process_percent', + 'subJobId' => 'subJobId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * subJobId 子任务ID + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'currentTask' => 'setCurrentTask', + 'imageName' => 'setImageName', + 'processPercent' => 'setProcessPercent', + 'subJobId' => 'setSubJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * currentTask 当前任务名称 + * imageName 镜像名称 + * processPercent 任务执行进度 + * subJobId 子任务ID + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'currentTask' => 'getCurrentTask', + 'imageName' => 'getImageName', + 'processPercent' => 'getProcessPercent', + 'subJobId' => 'getSubJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['currentTask'] = isset($data['currentTask']) ? $data['currentTask'] : null; + $this->container['imageName'] = isset($data['imageName']) ? $data['imageName'] : null; + $this->container['processPercent'] = isset($data['processPercent']) ? $data['processPercent'] : null; + $this->container['subJobId'] = isset($data['subJobId']) ? $data['subJobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string|null + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string|null $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets currentTask + * 当前任务名称 + * + * @return string|null + */ + public function getCurrentTask() + { + return $this->container['currentTask']; + } + + /** + * Sets currentTask + * + * @param string|null $currentTask 当前任务名称 + * + * @return $this + */ + public function setCurrentTask($currentTask) + { + $this->container['currentTask'] = $currentTask; + return $this; + } + + /** + * Gets imageName + * 镜像名称 + * + * @return string|null + */ + public function getImageName() + { + return $this->container['imageName']; + } + + /** + * Sets imageName + * + * @param string|null $imageName 镜像名称 + * + * @return $this + */ + public function setImageName($imageName) + { + $this->container['imageName'] = $imageName; + return $this; + } + + /** + * Gets processPercent + * 任务执行进度 + * + * @return double|null + */ + public function getProcessPercent() + { + return $this->container['processPercent']; + } + + /** + * Sets processPercent + * + * @param double|null $processPercent 任务执行进度 + * + * @return $this + */ + public function setProcessPercent($processPercent) + { + $this->container['processPercent'] = $processPercent; + return $this; + } + + /** + * Gets subJobId + * 子任务ID + * + * @return string|null + */ + public function getSubJobId() + { + return $this->container['subJobId']; + } + + /** + * Sets subJobId + * + * @param string|null $subJobId 子任务ID + * + * @return $this + */ + public function setSubJobId($subJobId) + { + $this->container['subJobId'] = $subJobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/Links.php b/Services/Ims/V2/Model/Links.php new file mode 100755 index 0000000..571d237 --- /dev/null +++ b/Services/Ims/V2/Model/Links.php @@ -0,0 +1,306 @@ + 'string', + 'rel' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * href 域名 + * rel 域名描述 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'href' => null, + 'rel' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * href 域名 + * rel 域名描述 + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href', + 'rel' => 'rel' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * href 域名 + * rel 域名描述 + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref', + 'rel' => 'setRel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * href 域名 + * rel 域名描述 + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref', + 'rel' => 'getRel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['href'] = isset($data['href']) ? $data['href'] : null; + $this->container['rel'] = isset($data['rel']) ? $data['rel'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['href'] === null) { + $invalidProperties[] = "'href' can't be null"; + } + if ($this->container['rel'] === null) { + $invalidProperties[] = "'rel' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * 域名 + * + * @return string + */ + public function getHref() + { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string $href 域名 + * + * @return $this + */ + public function setHref($href) + { + $this->container['href'] = $href; + return $this; + } + + /** + * Gets rel + * 域名描述 + * + * @return string + */ + public function getRel() + { + return $this->container['rel']; + } + + /** + * Sets rel + * + * @param string $rel 域名描述 + * + * @return $this + */ + public function setRel($rel) + { + $this->container['rel'] = $rel; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImageByTagsRequest.php b/Services/Ims/V2/Model/ListImageByTagsRequest.php new file mode 100755 index 0000000..ade0e8a --- /dev/null +++ b/Services/Ims/V2/Model/ListImageByTagsRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Ims\V2\Model\ListImageByTagsRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\ListImageByTagsRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\ListImageByTagsRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImageByTagsRequestBody.php b/Services/Ims/V2/Model/ListImageByTagsRequestBody.php new file mode 100755 index 0000000..cd4f0f0 --- /dev/null +++ b/Services/Ims/V2/Model/ListImageByTagsRequestBody.php @@ -0,0 +1,571 @@ + 'string', + 'tags' => '\G42Cloud\SDK\Ims\V2\Model\Tags[]', + 'tagsAny' => '\G42Cloud\SDK\Ims\V2\Model\Tags[]', + 'notTags' => '\G42Cloud\SDK\Ims\V2\Model\Tags[]', + 'notTagsAny' => '\G42Cloud\SDK\Ims\V2\Model\Tags[]', + 'limit' => 'string', + 'offset' => 'string', + 'matches' => '\G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]', + 'withoutAnyTag' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * action 操作标识(区分大小写),支持filter、count。filter就是分页查询;count是只需按照条件将总条数返回即可。 + * tags 包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * tagsAny 包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不允许为空列表,但可以不传递参数。 + * notTags 不包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * notTagsAny 不包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * limit 最大查询记录数(action为count,时此参数无效)如果action为filter默认为10,limit最多为1000,不能为负数,最小值为1。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数(action为count时,此参数无效),如果action为filter默认为0,不能为负数。 + * matches 搜索字段,key为要匹配的字段,如resource_name、resource_id等。value为匹配的值。多个matches的key不允许重复。不允许为空列表,但可以不传递参数。 + * withoutAnyTag 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略tag、not_tags、tags_any、not_tags_any字段。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'action' => null, + 'tags' => null, + 'tagsAny' => null, + 'notTags' => null, + 'notTagsAny' => null, + 'limit' => null, + 'offset' => null, + 'matches' => null, + 'withoutAnyTag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * action 操作标识(区分大小写),支持filter、count。filter就是分页查询;count是只需按照条件将总条数返回即可。 + * tags 包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * tagsAny 包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不允许为空列表,但可以不传递参数。 + * notTags 不包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * notTagsAny 不包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * limit 最大查询记录数(action为count,时此参数无效)如果action为filter默认为10,limit最多为1000,不能为负数,最小值为1。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数(action为count时,此参数无效),如果action为filter默认为0,不能为负数。 + * matches 搜索字段,key为要匹配的字段,如resource_name、resource_id等。value为匹配的值。多个matches的key不允许重复。不允许为空列表,但可以不传递参数。 + * withoutAnyTag 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略tag、not_tags、tags_any、not_tags_any字段。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'action' => 'action', + 'tags' => 'tags', + 'tagsAny' => 'tags_any', + 'notTags' => 'not_tags', + 'notTagsAny' => 'not_tags_any', + 'limit' => 'limit', + 'offset' => 'offset', + 'matches' => 'matches', + 'withoutAnyTag' => 'without_any_tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * action 操作标识(区分大小写),支持filter、count。filter就是分页查询;count是只需按照条件将总条数返回即可。 + * tags 包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * tagsAny 包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不允许为空列表,但可以不传递参数。 + * notTags 不包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * notTagsAny 不包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * limit 最大查询记录数(action为count,时此参数无效)如果action为filter默认为10,limit最多为1000,不能为负数,最小值为1。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数(action为count时,此参数无效),如果action为filter默认为0,不能为负数。 + * matches 搜索字段,key为要匹配的字段,如resource_name、resource_id等。value为匹配的值。多个matches的key不允许重复。不允许为空列表,但可以不传递参数。 + * withoutAnyTag 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略tag、not_tags、tags_any、not_tags_any字段。 + * + * @var string[] + */ + protected static $setters = [ + 'action' => 'setAction', + 'tags' => 'setTags', + 'tagsAny' => 'setTagsAny', + 'notTags' => 'setNotTags', + 'notTagsAny' => 'setNotTagsAny', + 'limit' => 'setLimit', + 'offset' => 'setOffset', + 'matches' => 'setMatches', + 'withoutAnyTag' => 'setWithoutAnyTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * action 操作标识(区分大小写),支持filter、count。filter就是分页查询;count是只需按照条件将总条数返回即可。 + * tags 包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * tagsAny 包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不允许为空列表,但可以不传递参数。 + * notTags 不包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * notTagsAny 不包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * limit 最大查询记录数(action为count,时此参数无效)如果action为filter默认为10,limit最多为1000,不能为负数,最小值为1。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数(action为count时,此参数无效),如果action为filter默认为0,不能为负数。 + * matches 搜索字段,key为要匹配的字段,如resource_name、resource_id等。value为匹配的值。多个matches的key不允许重复。不允许为空列表,但可以不传递参数。 + * withoutAnyTag 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略tag、not_tags、tags_any、not_tags_any字段。 + * + * @var string[] + */ + protected static $getters = [ + 'action' => 'getAction', + 'tags' => 'getTags', + 'tagsAny' => 'getTagsAny', + 'notTags' => 'getNotTags', + 'notTagsAny' => 'getNotTagsAny', + 'limit' => 'getLimit', + 'offset' => 'getOffset', + 'matches' => 'getMatches', + 'withoutAnyTag' => 'getWithoutAnyTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const ACTION_FILTER = 'filter'; + const ACTION_COUNT = 'count'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActionAllowableValues() + { + return [ + self::ACTION_FILTER, + self::ACTION_COUNT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['tagsAny'] = isset($data['tagsAny']) ? $data['tagsAny'] : null; + $this->container['notTags'] = isset($data['notTags']) ? $data['notTags'] : null; + $this->container['notTagsAny'] = isset($data['notTagsAny']) ? $data['notTagsAny'] : null; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : null; + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : null; + $this->container['matches'] = isset($data['matches']) ? $data['matches'] : null; + $this->container['withoutAnyTag'] = isset($data['withoutAnyTag']) ? $data['withoutAnyTag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['action'] === null) { + $invalidProperties[] = "'action' can't be null"; + } + $allowedValues = $this->getActionAllowableValues(); + if (!is_null($this->container['action']) && !in_array($this->container['action'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'action', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets action + * 操作标识(区分大小写),支持filter、count。filter就是分页查询;count是只需按照条件将总条数返回即可。 + * + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string $action 操作标识(区分大小写),支持filter、count。filter就是分页查询;count是只需按照条件将总条数返回即可。 + * + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + return $this; + } + + /** + * Gets tags + * 包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Tags[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Ims\V2\Model\Tags[]|null $tags 包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets tagsAny + * 包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不允许为空列表,但可以不传递参数。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Tags[]|null + */ + public function getTagsAny() + { + return $this->container['tagsAny']; + } + + /** + * Sets tagsAny + * + * @param \G42Cloud\SDK\Ims\V2\Model\Tags[]|null $tagsAny 包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不允许为空列表,但可以不传递参数。 + * + * @return $this + */ + public function setTagsAny($tagsAny) + { + $this->container['tagsAny'] = $tagsAny; + return $this; + } + + /** + * Gets notTags + * 不包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Tags[]|null + */ + public function getNotTags() + { + return $this->container['notTags']; + } + + /** + * Sets notTags + * + * @param \G42Cloud\SDK\Ims\V2\Model\Tags[]|null $notTags 不包含标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * + * @return $this + */ + public function setNotTags($notTags) + { + $this->container['notTags'] = $notTags; + return $this; + } + + /** + * Gets notTagsAny + * 不包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Tags[]|null + */ + public function getNotTagsAny() + { + return $this->container['notTagsAny']; + } + + /** + * Sets notTagsAny + * + * @param \G42Cloud\SDK\Ims\V2\Model\Tags[]|null $notTagsAny 不包含任意标签,最多包含10个key,每个key对应的values最多包含10个值,且key和values都不能重复。不能为空列表。 + * + * @return $this + */ + public function setNotTagsAny($notTagsAny) + { + $this->container['notTagsAny'] = $notTagsAny; + return $this; + } + + /** + * Gets limit + * 最大查询记录数(action为count,时此参数无效)如果action为filter默认为10,limit最多为1000,不能为负数,最小值为1。 + * + * @return string|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param string|null $limit 最大查询记录数(action为count,时此参数无效)如果action为filter默认为10,limit最多为1000,不能为负数,最小值为1。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets offset + * 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数(action为count时,此参数无效),如果action为filter默认为0,不能为负数。 + * + * @return string|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param string|null $offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数(action为count时,此参数无效),如果action为filter默认为0,不能为负数。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets matches + * 搜索字段,key为要匹配的字段,如resource_name、resource_id等。value为匹配的值。多个matches的key不允许重复。不允许为空列表,但可以不传递参数。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]|null + */ + public function getMatches() + { + return $this->container['matches']; + } + + /** + * Sets matches + * + * @param \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]|null $matches 搜索字段,key为要匹配的字段,如resource_name、resource_id等。value为匹配的值。多个matches的key不允许重复。不允许为空列表,但可以不传递参数。 + * + * @return $this + */ + public function setMatches($matches) + { + $this->container['matches'] = $matches; + return $this; + } + + /** + * Gets withoutAnyTag + * 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略tag、not_tags、tags_any、not_tags_any字段。 + * + * @return bool|null + */ + public function getWithoutAnyTag() + { + return $this->container['withoutAnyTag']; + } + + /** + * Sets withoutAnyTag + * + * @param bool|null $withoutAnyTag 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略tag、not_tags、tags_any、not_tags_any字段。 + * + * @return $this + */ + public function setWithoutAnyTag($withoutAnyTag) + { + $this->container['withoutAnyTag'] = $withoutAnyTag; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImageByTagsResponse.php b/Services/Ims/V2/Model/ListImageByTagsResponse.php new file mode 100755 index 0000000..19dba98 --- /dev/null +++ b/Services/Ims/V2/Model/ListImageByTagsResponse.php @@ -0,0 +1,301 @@ + '\G42Cloud\SDK\Ims\V2\Model\ShowImageByTagsResource[]', + 'totalCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resources 镜像信息列表 + * totalCount 总记录数 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resources' => null, + 'totalCount' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resources 镜像信息列表 + * totalCount 总记录数 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resources' => 'resources', + 'totalCount' => 'total_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resources 镜像信息列表 + * totalCount 总记录数 + * + * @var string[] + */ + protected static $setters = [ + 'resources' => 'setResources', + 'totalCount' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resources 镜像信息列表 + * totalCount 总记录数 + * + * @var string[] + */ + protected static $getters = [ + 'resources' => 'getResources', + 'totalCount' => 'getTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resources'] = isset($data['resources']) ? $data['resources'] : null; + $this->container['totalCount'] = isset($data['totalCount']) ? $data['totalCount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resources + * 镜像信息列表 + * + * @return \G42Cloud\SDK\Ims\V2\Model\ShowImageByTagsResource[]|null + */ + public function getResources() + { + return $this->container['resources']; + } + + /** + * Sets resources + * + * @param \G42Cloud\SDK\Ims\V2\Model\ShowImageByTagsResource[]|null $resources 镜像信息列表 + * + * @return $this + */ + public function setResources($resources) + { + $this->container['resources'] = $resources; + return $this; + } + + /** + * Gets totalCount + * 总记录数 + * + * @return int|null + */ + public function getTotalCount() + { + return $this->container['totalCount']; + } + + /** + * Sets totalCount + * + * @param int|null $totalCount 总记录数 + * + * @return $this + */ + public function setTotalCount($totalCount) + { + $this->container['totalCount'] = $totalCount; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImageTagsRequest.php b/Services/Ims/V2/Model/ListImageTagsRequest.php new file mode 100755 index 0000000..f875154 --- /dev/null +++ b/Services/Ims/V2/Model/ListImageTagsRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImageTagsResponse.php b/Services/Ims/V2/Model/ListImageTagsResponse.php new file mode 100755 index 0000000..854a9a5 --- /dev/null +++ b/Services/Ims/V2/Model/ListImageTagsResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Ims\V2\Model\ResourceTag[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tags 标签列表 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tags 标签列表 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tags 标签列表 + * + * @var string[] + */ + protected static $setters = [ + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tags 标签列表 + * + * @var string[] + */ + protected static $getters = [ + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tags + * 标签列表 + * + * @return \G42Cloud\SDK\Ims\V2\Model\ResourceTag[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Ims\V2\Model\ResourceTag[]|null $tags 标签列表 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImagesRequest.php b/Services/Ims/V2/Model/ListImagesRequest.php new file mode 100755 index 0000000..b78d3fa --- /dev/null +++ b/Services/Ims/V2/Model/ListImagesRequest.php @@ -0,0 +1,1880 @@ + 'string', + 'isregistered' => 'string', + 'osBit' => 'string', + 'osType' => 'string', + 'platform' => 'string', + 'supportDiskintensive' => 'string', + 'supportHighperformance' => 'string', + 'supportKvm' => 'string', + 'supportKvmGpuType' => 'string', + 'supportKvmInfiniband' => 'string', + 'supportLargememory' => 'string', + 'supportXen' => 'string', + 'supportXenGpuType' => 'string', + 'supportXenHana' => 'string', + 'containerFormat' => 'string', + 'diskFormat' => 'string', + 'enterpriseProjectId' => 'string', + 'id' => 'string', + 'limit' => 'int', + 'marker' => 'string', + 'memberStatus' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'protected' => 'bool', + 'sortDir' => 'string', + 'sortKey' => 'string', + 'status' => 'string', + 'tag' => 'string', + 'virtualEnvType' => 'string', + 'visibility' => 'string', + 'xSdkDate' => 'string', + 'flavorId' => 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string', + 'architecture' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 镜像是否可用,取值为true,扩展接口会默认为true,普通用户只能查询取值为true的镜像。 + * osBit 操作系统位数,一般取值为32或者64。 + * osType 镜像系统类型,取值为Linux,Windows,Other。 + * platform 镜像平台分类 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 取值为0,表示查询属于default企业项目下的镜像。 取值为UUID,表示查询属于该UUID对应的企业项目下的镜像。取值为all_granted_eps,表示查询当前用户所有企业项目下的镜像。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认取值为500。 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时设置“visibility”参数为“shared”。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,取值为true/false,一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc。 + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status ,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取值是DataImage,如果是裸金属服务器镜像,则取值是Ironic。 + * visibility 是否被其他租户可见,取值为public或private + * xSdkDate 请求的发生时间,格式为YYYYMMDDTHHMMSSZ。取值为当前系统的GMT时间。使用AK/SK认证时该字段必选 + * flavorId 用于通过云服务器规格过滤出可用公共镜像,取值为规格ID。 当前仅支持通过单个规格进行过滤。 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * architecture 镜像架构类型。取值包括: x86 arm + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imagetype' => null, + 'isregistered' => null, + 'osBit' => null, + 'osType' => null, + 'platform' => null, + 'supportDiskintensive' => null, + 'supportHighperformance' => null, + 'supportKvm' => null, + 'supportKvmGpuType' => null, + 'supportKvmInfiniband' => null, + 'supportLargememory' => null, + 'supportXen' => null, + 'supportXenGpuType' => null, + 'supportXenHana' => null, + 'containerFormat' => null, + 'diskFormat' => null, + 'enterpriseProjectId' => null, + 'id' => null, + 'limit' => 'int32', + 'marker' => null, + 'memberStatus' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'owner' => null, + 'protected' => null, + 'sortDir' => null, + 'sortKey' => null, + 'status' => null, + 'tag' => null, + 'virtualEnvType' => null, + 'visibility' => null, + 'xSdkDate' => null, + 'flavorId' => null, + 'createdAt' => null, + 'updatedAt' => null, + 'architecture' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 镜像是否可用,取值为true,扩展接口会默认为true,普通用户只能查询取值为true的镜像。 + * osBit 操作系统位数,一般取值为32或者64。 + * osType 镜像系统类型,取值为Linux,Windows,Other。 + * platform 镜像平台分类 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 取值为0,表示查询属于default企业项目下的镜像。 取值为UUID,表示查询属于该UUID对应的企业项目下的镜像。取值为all_granted_eps,表示查询当前用户所有企业项目下的镜像。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认取值为500。 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时设置“visibility”参数为“shared”。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,取值为true/false,一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc。 + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status ,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取值是DataImage,如果是裸金属服务器镜像,则取值是Ironic。 + * visibility 是否被其他租户可见,取值为public或private + * xSdkDate 请求的发生时间,格式为YYYYMMDDTHHMMSSZ。取值为当前系统的GMT时间。使用AK/SK认证时该字段必选 + * flavorId 用于通过云服务器规格过滤出可用公共镜像,取值为规格ID。 当前仅支持通过单个规格进行过滤。 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * architecture 镜像架构类型。取值包括: x86 arm + * + * @var string[] + */ + protected static $attributeMap = [ + 'imagetype' => '__imagetype', + 'isregistered' => '__isregistered', + 'osBit' => '__os_bit', + 'osType' => '__os_type', + 'platform' => '__platform', + 'supportDiskintensive' => '__support_diskintensive', + 'supportHighperformance' => '__support_highperformance', + 'supportKvm' => '__support_kvm', + 'supportKvmGpuType' => '__support_kvm_gpu_type', + 'supportKvmInfiniband' => '__support_kvm_infiniband', + 'supportLargememory' => '__support_largememory', + 'supportXen' => '__support_xen', + 'supportXenGpuType' => '__support_xen_gpu_type', + 'supportXenHana' => '__support_xen_hana', + 'containerFormat' => 'container_format', + 'diskFormat' => 'disk_format', + 'enterpriseProjectId' => 'enterprise_project_id', + 'id' => 'id', + 'limit' => 'limit', + 'marker' => 'marker', + 'memberStatus' => 'member_status', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'owner' => 'owner', + 'protected' => 'protected', + 'sortDir' => 'sort_dir', + 'sortKey' => 'sort_key', + 'status' => 'status', + 'tag' => 'tag', + 'virtualEnvType' => 'virtual_env_type', + 'visibility' => 'visibility', + 'xSdkDate' => 'X-Sdk-Date', + 'flavorId' => 'flavor_id', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'architecture' => 'architecture' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 镜像是否可用,取值为true,扩展接口会默认为true,普通用户只能查询取值为true的镜像。 + * osBit 操作系统位数,一般取值为32或者64。 + * osType 镜像系统类型,取值为Linux,Windows,Other。 + * platform 镜像平台分类 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 取值为0,表示查询属于default企业项目下的镜像。 取值为UUID,表示查询属于该UUID对应的企业项目下的镜像。取值为all_granted_eps,表示查询当前用户所有企业项目下的镜像。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认取值为500。 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时设置“visibility”参数为“shared”。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,取值为true/false,一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc。 + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status ,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取值是DataImage,如果是裸金属服务器镜像,则取值是Ironic。 + * visibility 是否被其他租户可见,取值为public或private + * xSdkDate 请求的发生时间,格式为YYYYMMDDTHHMMSSZ。取值为当前系统的GMT时间。使用AK/SK认证时该字段必选 + * flavorId 用于通过云服务器规格过滤出可用公共镜像,取值为规格ID。 当前仅支持通过单个规格进行过滤。 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * architecture 镜像架构类型。取值包括: x86 arm + * + * @var string[] + */ + protected static $setters = [ + 'imagetype' => 'setImagetype', + 'isregistered' => 'setIsregistered', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType', + 'platform' => 'setPlatform', + 'supportDiskintensive' => 'setSupportDiskintensive', + 'supportHighperformance' => 'setSupportHighperformance', + 'supportKvm' => 'setSupportKvm', + 'supportKvmGpuType' => 'setSupportKvmGpuType', + 'supportKvmInfiniband' => 'setSupportKvmInfiniband', + 'supportLargememory' => 'setSupportLargememory', + 'supportXen' => 'setSupportXen', + 'supportXenGpuType' => 'setSupportXenGpuType', + 'supportXenHana' => 'setSupportXenHana', + 'containerFormat' => 'setContainerFormat', + 'diskFormat' => 'setDiskFormat', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'id' => 'setId', + 'limit' => 'setLimit', + 'marker' => 'setMarker', + 'memberStatus' => 'setMemberStatus', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'owner' => 'setOwner', + 'protected' => 'setProtected', + 'sortDir' => 'setSortDir', + 'sortKey' => 'setSortKey', + 'status' => 'setStatus', + 'tag' => 'setTag', + 'virtualEnvType' => 'setVirtualEnvType', + 'visibility' => 'setVisibility', + 'xSdkDate' => 'setXSdkDate', + 'flavorId' => 'setFlavorId', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', + 'architecture' => 'setArchitecture' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 镜像是否可用,取值为true,扩展接口会默认为true,普通用户只能查询取值为true的镜像。 + * osBit 操作系统位数,一般取值为32或者64。 + * osType 镜像系统类型,取值为Linux,Windows,Other。 + * platform 镜像平台分类 + * supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * containerFormat 容器类型 + * diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 取值为0,表示查询属于default企业项目下的镜像。 取值为UUID,表示查询属于该UUID对应的企业项目下的镜像。取值为all_granted_eps,表示查询当前用户所有企业项目下的镜像。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * id 镜像ID + * limit 用于分页,表示查询几条镜像记录,取值为整数,默认取值为500。 + * marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时设置“visibility”参数为“shared”。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * name 镜像名称 + * owner 镜像属于哪个租户 + * protected 镜像是否是受保护,取值为true/false,一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc。 + * sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status ,id,size字段,默认为创建时间。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询。 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取值是DataImage,如果是裸金属服务器镜像,则取值是Ironic。 + * visibility 是否被其他租户可见,取值为public或private + * xSdkDate 请求的发生时间,格式为YYYYMMDDTHHMMSSZ。取值为当前系统的GMT时间。使用AK/SK认证时该字段必选 + * flavorId 用于通过云服务器规格过滤出可用公共镜像,取值为规格ID。 当前仅支持通过单个规格进行过滤。 + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * architecture 镜像架构类型。取值包括: x86 arm + * + * @var string[] + */ + protected static $getters = [ + 'imagetype' => 'getImagetype', + 'isregistered' => 'getIsregistered', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType', + 'platform' => 'getPlatform', + 'supportDiskintensive' => 'getSupportDiskintensive', + 'supportHighperformance' => 'getSupportHighperformance', + 'supportKvm' => 'getSupportKvm', + 'supportKvmGpuType' => 'getSupportKvmGpuType', + 'supportKvmInfiniband' => 'getSupportKvmInfiniband', + 'supportLargememory' => 'getSupportLargememory', + 'supportXen' => 'getSupportXen', + 'supportXenGpuType' => 'getSupportXenGpuType', + 'supportXenHana' => 'getSupportXenHana', + 'containerFormat' => 'getContainerFormat', + 'diskFormat' => 'getDiskFormat', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'id' => 'getId', + 'limit' => 'getLimit', + 'marker' => 'getMarker', + 'memberStatus' => 'getMemberStatus', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'owner' => 'getOwner', + 'protected' => 'getProtected', + 'sortDir' => 'getSortDir', + 'sortKey' => 'getSortKey', + 'status' => 'getStatus', + 'tag' => 'getTag', + 'virtualEnvType' => 'getVirtualEnvType', + 'visibility' => 'getVisibility', + 'xSdkDate' => 'getXSdkDate', + 'flavorId' => 'getFlavorId', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', + 'architecture' => 'getArchitecture' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const ISREGISTERED_TRUE = 'true'; + const ISREGISTERED_FALSE = 'false'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const PLATFORM_WINDOWS = 'Windows'; + const PLATFORM_UBUNTU = 'Ubuntu'; + const PLATFORM_RED_HAT = 'RedHat'; + const PLATFORM_SUSE = 'SUSE'; + const PLATFORM_CENT_OS = 'CentOS'; + const PLATFORM_DEBIAN = 'Debian'; + const PLATFORM_OPEN_SUSE = 'OpenSUSE'; + const PLATFORM_ORACLE_LINUX = 'Oracle Linux'; + const PLATFORM_FEDORA = 'Fedora'; + const PLATFORM_OTHER = 'Other'; + const PLATFORM_CORE_OS = 'CoreOS'; + const PLATFORM_EULER_OS = 'EulerOS'; + const DISK_FORMAT_VHD = 'vhd'; + const DISK_FORMAT_ZVHD = 'zvhd'; + const DISK_FORMAT_RAW = 'raw'; + const DISK_FORMAT_QCOW2 = 'qcow2'; + const DISK_FORMAT_ZVHD2 = 'zvhd2'; + const MEMBER_STATUS_ACCEPTED = 'accepted'; + const MEMBER_STATUS_REJECTED = 'rejected'; + const MEMBER_STATUS_PENDING = 'pending'; + const SORT_DIR_ASC = 'asc'; + const SORT_DIR_DESC = 'desc'; + const SORT_KEY_CREATED_AT = 'created_at'; + const SORT_KEY_NAME = 'name'; + const SORT_KEY_CONTAINER_FORMAT = 'container_format'; + const SORT_KEY_DISK_FORMAT = 'disk_format'; + const SORT_KEY_STATUS = 'status'; + const SORT_KEY_ID = 'id'; + const SORT_KEY_SIZE = 'size'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + const VISIBILITY__PUBLIC = 'public'; + const VISIBILITY__PRIVATE = 'private'; + const ARCHITECTURE_X86 = 'x86'; + const ARCHITECTURE_ARM = 'arm'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsregisteredAllowableValues() + { + return [ + self::ISREGISTERED_TRUE, + self::ISREGISTERED_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_WINDOWS, + self::PLATFORM_UBUNTU, + self::PLATFORM_RED_HAT, + self::PLATFORM_SUSE, + self::PLATFORM_CENT_OS, + self::PLATFORM_DEBIAN, + self::PLATFORM_OPEN_SUSE, + self::PLATFORM_ORACLE_LINUX, + self::PLATFORM_FEDORA, + self::PLATFORM_OTHER, + self::PLATFORM_CORE_OS, + self::PLATFORM_EULER_OS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDiskFormatAllowableValues() + { + return [ + self::DISK_FORMAT_VHD, + self::DISK_FORMAT_ZVHD, + self::DISK_FORMAT_RAW, + self::DISK_FORMAT_QCOW2, + self::DISK_FORMAT_ZVHD2, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMemberStatusAllowableValues() + { + return [ + self::MEMBER_STATUS_ACCEPTED, + self::MEMBER_STATUS_REJECTED, + self::MEMBER_STATUS_PENDING, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSortDirAllowableValues() + { + return [ + self::SORT_DIR_ASC, + self::SORT_DIR_DESC, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSortKeyAllowableValues() + { + return [ + self::SORT_KEY_CREATED_AT, + self::SORT_KEY_NAME, + self::SORT_KEY_CONTAINER_FORMAT, + self::SORT_KEY_DISK_FORMAT, + self::SORT_KEY_STATUS, + self::SORT_KEY_ID, + self::SORT_KEY_SIZE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVisibilityAllowableValues() + { + return [ + self::VISIBILITY__PUBLIC, + self::VISIBILITY__PRIVATE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArchitectureAllowableValues() + { + return [ + self::ARCHITECTURE_X86, + self::ARCHITECTURE_ARM, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : 'true'; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['supportDiskintensive'] = isset($data['supportDiskintensive']) ? $data['supportDiskintensive'] : null; + $this->container['supportHighperformance'] = isset($data['supportHighperformance']) ? $data['supportHighperformance'] : null; + $this->container['supportKvm'] = isset($data['supportKvm']) ? $data['supportKvm'] : null; + $this->container['supportKvmGpuType'] = isset($data['supportKvmGpuType']) ? $data['supportKvmGpuType'] : null; + $this->container['supportKvmInfiniband'] = isset($data['supportKvmInfiniband']) ? $data['supportKvmInfiniband'] : null; + $this->container['supportLargememory'] = isset($data['supportLargememory']) ? $data['supportLargememory'] : null; + $this->container['supportXen'] = isset($data['supportXen']) ? $data['supportXen'] : null; + $this->container['supportXenGpuType'] = isset($data['supportXenGpuType']) ? $data['supportXenGpuType'] : null; + $this->container['supportXenHana'] = isset($data['supportXenHana']) ? $data['supportXenHana'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : null; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : '0'; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 500; + $this->container['marker'] = isset($data['marker']) ? $data['marker'] : null; + $this->container['memberStatus'] = isset($data['memberStatus']) ? $data['memberStatus'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['sortDir'] = isset($data['sortDir']) ? $data['sortDir'] : 'desc'; + $this->container['sortKey'] = isset($data['sortKey']) ? $data['sortKey'] : 'created_at'; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['xSdkDate'] = isset($data['xSdkDate']) ? $data['xSdkDate'] : null; + $this->container['flavorId'] = isset($data['flavorId']) ? $data['flavorId'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['architecture'] = isset($data['architecture']) ? $data['architecture'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsregisteredAllowableValues(); + if (!is_null($this->container['isregistered']) && !in_array($this->container['isregistered'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isregistered', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'platform', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDiskFormatAllowableValues(); + if (!is_null($this->container['diskFormat']) && !in_array($this->container['diskFormat'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'diskFormat', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getMemberStatusAllowableValues(); + if (!is_null($this->container['memberStatus']) && !in_array($this->container['memberStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'memberStatus', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] > 1024)) { + $invalidProperties[] = "invalid value for 'minDisk', must be smaller than or equal to 1024."; + } + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] < 40)) { + $invalidProperties[] = "invalid value for 'minDisk', must be bigger than or equal to 40."; + } + $allowedValues = $this->getSortDirAllowableValues(); + if (!is_null($this->container['sortDir']) && !in_array($this->container['sortDir'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'sortDir', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSortKeyAllowableValues(); + if (!is_null($this->container['sortKey']) && !in_array($this->container['sortKey'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'sortKey', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVisibilityAllowableValues(); + if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'visibility', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getArchitectureAllowableValues(); + if (!is_null($this->container['architecture']) && !in_array($this->container['architecture'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'architecture', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * + * @return string|null + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string|null $imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets isregistered + * 镜像是否可用,取值为true,扩展接口会默认为true,普通用户只能查询取值为true的镜像。 + * + * @return string|null + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param string|null $isregistered 镜像是否可用,取值为true,扩展接口会默认为true,普通用户只能查询取值为true的镜像。 + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets osBit + * 操作系统位数,一般取值为32或者64。 + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 操作系统位数,一般取值为32或者64。 + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 镜像系统类型,取值为Linux,Windows,Other。 + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 镜像系统类型,取值为Linux,Windows,Other。 + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets platform + * 镜像平台分类 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets supportDiskintensive + * 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportDiskintensive() + { + return $this->container['supportDiskintensive']; + } + + /** + * Sets supportDiskintensive + * + * @param string|null $supportDiskintensive 表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportDiskintensive($supportDiskintensive) + { + $this->container['supportDiskintensive'] = $supportDiskintensive; + return $this; + } + + /** + * Gets supportHighperformance + * 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportHighperformance() + { + return $this->container['supportHighperformance']; + } + + /** + * Sets supportHighperformance + * + * @param string|null $supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportHighperformance($supportHighperformance) + { + $this->container['supportHighperformance'] = $supportHighperformance; + return $this; + } + + /** + * Gets supportKvm + * 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportKvm() + { + return $this->container['supportKvm']; + } + + /** + * Sets supportKvm + * + * @param string|null $supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportKvm($supportKvm) + { + $this->container['supportKvm'] = $supportKvm; + return $this; + } + + /** + * Gets supportKvmGpuType + * 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmGpuType() + { + return $this->container['supportKvmGpuType']; + } + + /** + * Sets supportKvmGpuType + * + * @param string|null $supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportKvmGpuType($supportKvmGpuType) + { + $this->container['supportKvmGpuType'] = $supportKvmGpuType; + return $this; + } + + /** + * Gets supportKvmInfiniband + * 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmInfiniband() + { + return $this->container['supportKvmInfiniband']; + } + + /** + * Sets supportKvmInfiniband + * + * @param string|null $supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return $this + */ + public function setSupportKvmInfiniband($supportKvmInfiniband) + { + $this->container['supportKvmInfiniband'] = $supportKvmInfiniband; + return $this; + } + + /** + * Gets supportLargememory + * 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportLargememory() + { + return $this->container['supportLargememory']; + } + + /** + * Sets supportLargememory + * + * @param string|null $supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportLargememory($supportLargememory) + { + $this->container['supportLargememory'] = $supportLargememory; + return $this; + } + + /** + * Gets supportXen + * 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportXen() + { + return $this->container['supportXen']; + } + + /** + * Sets supportXen + * + * @param string|null $supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportXen($supportXen) + { + $this->container['supportXen'] = $supportXen; + return $this; + } + + /** + * Gets supportXenGpuType + * 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenGpuType() + { + return $this->container['supportXenGpuType']; + } + + /** + * Sets supportXenGpuType + * + * @param string|null $supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenGpuType($supportXenGpuType) + { + $this->container['supportXenGpuType'] = $supportXenGpuType; + return $this; + } + + /** + * Gets supportXenHana + * 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenHana() + { + return $this->container['supportXenHana']; + } + + /** + * Sets supportXenHana + * + * @param string|null $supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenHana($supportXenHana) + { + $this->container['supportXenHana'] = $supportXenHana; + return $this; + } + + /** + * Gets containerFormat + * 容器类型 + * + * @return string|null + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string|null $containerFormat 容器类型 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets diskFormat + * 镜像格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像格式,目前支持vhd,zvhd、raw,qcow2,zvhd2。默认值是vhd。 + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示查询某个企业项目下的镜像。 取值为0,表示查询属于default企业项目下的镜像。 取值为UUID,表示查询属于该UUID对应的企业项目下的镜像。取值为all_granted_eps,表示查询当前用户所有企业项目下的镜像。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示查询某个企业项目下的镜像。 取值为0,表示查询属于default企业项目下的镜像。 取值为UUID,表示查询属于该UUID对应的企业项目下的镜像。取值为all_granted_eps,表示查询当前用户所有企业项目下的镜像。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets id + * 镜像ID + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 镜像ID + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets limit + * 用于分页,表示查询几条镜像记录,取值为整数,默认取值为500。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 用于分页,表示查询几条镜像记录,取值为整数,默认取值为500。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets marker + * 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * + * @return string|null + */ + public function getMarker() + { + return $this->container['marker']; + } + + /** + * Sets marker + * + * @param string|null $marker 用于分页,表示从哪个镜像开始查询,取值为镜像ID。 + * + * @return $this + */ + public function setMarker($marker) + { + $this->container['marker'] = $marker; + return $this; + } + + /** + * Gets memberStatus + * 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时设置“visibility”参数为“shared”。 + * + * @return string|null + */ + public function getMemberStatus() + { + return $this->container['memberStatus']; + } + + /** + * Sets memberStatus + * + * @param string|null $memberStatus 成员状态。目前取值有accepted、rejected、pending。accepted表示已经接受共享的镜像,rejected表示已经拒绝了其他用户共享的镜像,pending表示需要确认的其他用户的共享镜像。需要在查询时设置“visibility”参数为“shared”。 + * + * @return $this + */ + public function setMemberStatus($memberStatus) + { + $this->container['memberStatus'] = $memberStatus; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。 + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets owner + * 镜像属于哪个租户 + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner 镜像属于哪个租户 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets protected + * 镜像是否是受保护,取值为true/false,一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * + * @return bool|null + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool|null $protected 镜像是否是受保护,取值为true/false,一般查询公共镜像时候取值为true,查询私有镜像可以不指定。 + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets sortDir + * 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc。 + * + * @return string|null + */ + public function getSortDir() + { + return $this->container['sortDir']; + } + + /** + * Sets sortDir + * + * @param string|null $sortDir 用于排序,表示升序还是降序,取值为asc和desc。与sort_key一起组合使用,默认为降序desc。 + * + * @return $this + */ + public function setSortDir($sortDir) + { + $this->container['sortDir'] = $sortDir; + return $this; + } + + /** + * Gets sortKey + * 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status ,id,size字段,默认为创建时间。 + * + * @return string|null + */ + public function getSortKey() + { + return $this->container['sortKey']; + } + + /** + * Sets sortKey + * + * @param string|null $sortKey 用于排序,表示按照哪个字段排序。取值为镜像属性name,container_format,disk_format,status ,id,size字段,默认为创建时间。 + * + * @return $this + */ + public function setSortKey($sortKey) + { + $this->container['sortKey'] = $sortKey; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets tag + * 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询。 + * + * @return string|null + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询。 + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Gets virtualEnvType + * 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取值是DataImage,如果是裸金属服务器镜像,则取值是Ironic。 + * + * @return string|null + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string|null $virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取值是DataImage,如果是裸金属服务器镜像,则取值是Ironic。 + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets visibility + * 是否被其他租户可见,取值为public或private + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string|null $visibility 是否被其他租户可见,取值为public或private + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets xSdkDate + * 请求的发生时间,格式为YYYYMMDDTHHMMSSZ。取值为当前系统的GMT时间。使用AK/SK认证时该字段必选 + * + * @return string|null + */ + public function getXSdkDate() + { + return $this->container['xSdkDate']; + } + + /** + * Sets xSdkDate + * + * @param string|null $xSdkDate 请求的发生时间,格式为YYYYMMDDTHHMMSSZ。取值为当前系统的GMT时间。使用AK/SK认证时该字段必选 + * + * @return $this + */ + public function setXSdkDate($xSdkDate) + { + $this->container['xSdkDate'] = $xSdkDate; + return $this; + } + + /** + * Gets flavorId + * 用于通过云服务器规格过滤出可用公共镜像,取值为规格ID。 当前仅支持通过单个规格进行过滤。 + * + * @return string|null + */ + public function getFlavorId() + { + return $this->container['flavorId']; + } + + /** + * Sets flavorId + * + * @param string|null $flavorId 用于通过云服务器规格过滤出可用公共镜像,取值为规格ID。 当前仅支持通过单个规格进行过滤。 + * + * @return $this + */ + public function setFlavorId($flavorId) + { + $this->container['flavorId'] = $flavorId; + return $this; + } + + /** + * Gets createdAt + * 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets architecture + * 镜像架构类型。取值包括: x86 arm + * + * @return string|null + */ + public function getArchitecture() + { + return $this->container['architecture']; + } + + /** + * Sets architecture + * + * @param string|null $architecture 镜像架构类型。取值包括: x86 arm + * + * @return $this + */ + public function setArchitecture($architecture) + { + $this->container['architecture'] = $architecture; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImagesResponse.php b/Services/Ims/V2/Model/ListImagesResponse.php new file mode 100755 index 0000000..d7db615 --- /dev/null +++ b/Services/Ims/V2/Model/ListImagesResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Ims\V2\Model\ImageInfo[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * images 镜像列表 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'images' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * images 镜像列表 + * + * @var string[] + */ + protected static $attributeMap = [ + 'images' => 'images' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * images 镜像列表 + * + * @var string[] + */ + protected static $setters = [ + 'images' => 'setImages' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * images 镜像列表 + * + * @var string[] + */ + protected static $getters = [ + 'images' => 'getImages' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['images'] = isset($data['images']) ? $data['images'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets images + * 镜像列表 + * + * @return \G42Cloud\SDK\Ims\V2\Model\ImageInfo[]|null + */ + public function getImages() + { + return $this->container['images']; + } + + /** + * Sets images + * + * @param \G42Cloud\SDK\Ims\V2\Model\ImageInfo[]|null $images 镜像列表 + * + * @return $this + */ + public function setImages($images) + { + $this->container['images'] = $images; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImagesTagsRequest.php b/Services/Ims/V2/Model/ListImagesTagsRequest.php new file mode 100755 index 0000000..e53c531 --- /dev/null +++ b/Services/Ims/V2/Model/ListImagesTagsRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListImagesTagsResponse.php b/Services/Ims/V2/Model/ListImagesTagsResponse.php new file mode 100755 index 0000000..aebc239 --- /dev/null +++ b/Services/Ims/V2/Model/ListImagesTagsResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Ims\V2\Model\Tags[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tags 标签列表 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tags 标签列表 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tags 标签列表 + * + * @var string[] + */ + protected static $setters = [ + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tags 标签列表 + * + * @var string[] + */ + protected static $getters = [ + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tags + * 标签列表 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Tags[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Ims\V2\Model\Tags[]|null $tags 标签列表 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListOsVersionsRequest.php b/Services/Ims/V2/Model/ListOsVersionsRequest.php new file mode 100755 index 0000000..9b31c97 --- /dev/null +++ b/Services/Ims/V2/Model/ListOsVersionsRequest.php @@ -0,0 +1,265 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tag OS的标签。 根据标签值可以过滤查询指定特性的OS信息。 取值范围: bms:表示该镜像支持BMS的os_version列表。 uefi:支持UEFI启动方式的os_version列表。 arm:显示基于arm架构的os_version列表。 x86:显示基于x86架构的os_version列表。不带tag查询条件则默认查询当前region支持的所有的OS列表。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tag OS的标签。 根据标签值可以过滤查询指定特性的OS信息。 取值范围: bms:表示该镜像支持BMS的os_version列表。 uefi:支持UEFI启动方式的os_version列表。 arm:显示基于arm架构的os_version列表。 x86:显示基于x86架构的os_version列表。不带tag查询条件则默认查询当前region支持的所有的OS列表。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tag OS的标签。 根据标签值可以过滤查询指定特性的OS信息。 取值范围: bms:表示该镜像支持BMS的os_version列表。 uefi:支持UEFI启动方式的os_version列表。 arm:显示基于arm架构的os_version列表。 x86:显示基于x86架构的os_version列表。不带tag查询条件则默认查询当前region支持的所有的OS列表。 + * + * @var string[] + */ + protected static $setters = [ + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tag OS的标签。 根据标签值可以过滤查询指定特性的OS信息。 取值范围: bms:表示该镜像支持BMS的os_version列表。 uefi:支持UEFI启动方式的os_version列表。 arm:显示基于arm架构的os_version列表。 x86:显示基于x86架构的os_version列表。不带tag查询条件则默认查询当前region支持的所有的OS列表。 + * + * @var string[] + */ + protected static $getters = [ + 'tag' => 'getTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tag + * OS的标签。 根据标签值可以过滤查询指定特性的OS信息。 取值范围: bms:表示该镜像支持BMS的os_version列表。 uefi:支持UEFI启动方式的os_version列表。 arm:显示基于arm架构的os_version列表。 x86:显示基于x86架构的os_version列表。不带tag查询条件则默认查询当前region支持的所有的OS列表。 + * + * @return string|null + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag OS的标签。 根据标签值可以过滤查询指定特性的OS信息。 取值范围: bms:表示该镜像支持BMS的os_version列表。 uefi:支持UEFI启动方式的os_version列表。 arm:显示基于arm架构的os_version列表。 x86:显示基于x86架构的os_version列表。不带tag查询条件则默认查询当前region支持的所有的OS列表。 + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListOsVersionsResponse.php b/Services/Ims/V2/Model/ListOsVersionsResponse.php new file mode 100755 index 0000000..a0fa878 --- /dev/null +++ b/Services/Ims/V2/Model/ListOsVersionsResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Ims\V2\Model\ListOsVersionsResponseBody[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\ListOsVersionsResponseBody[]|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\ListOsVersionsResponseBody[]|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListOsVersionsResponseBody.php b/Services/Ims/V2/Model/ListOsVersionsResponseBody.php new file mode 100755 index 0000000..e9b37f3 --- /dev/null +++ b/Services/Ims/V2/Model/ListOsVersionsResponseBody.php @@ -0,0 +1,306 @@ + 'string', + 'versionList' => '\G42Cloud\SDK\Ims\V2\Model\OsVersionInfo[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * platform 操作系统的平台值,如RedHat等 + * versionList 操作系统的详情值 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'platform' => null, + 'versionList' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * platform 操作系统的平台值,如RedHat等 + * versionList 操作系统的详情值 + * + * @var string[] + */ + protected static $attributeMap = [ + 'platform' => 'platform', + 'versionList' => 'version_list' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * platform 操作系统的平台值,如RedHat等 + * versionList 操作系统的详情值 + * + * @var string[] + */ + protected static $setters = [ + 'platform' => 'setPlatform', + 'versionList' => 'setVersionList' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * platform 操作系统的平台值,如RedHat等 + * versionList 操作系统的详情值 + * + * @var string[] + */ + protected static $getters = [ + 'platform' => 'getPlatform', + 'versionList' => 'getVersionList' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['versionList'] = isset($data['versionList']) ? $data['versionList'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['platform'] === null) { + $invalidProperties[] = "'platform' can't be null"; + } + if ($this->container['versionList'] === null) { + $invalidProperties[] = "'versionList' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets platform + * 操作系统的平台值,如RedHat等 + * + * @return string + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string $platform 操作系统的平台值,如RedHat等 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets versionList + * 操作系统的详情值 + * + * @return \G42Cloud\SDK\Ims\V2\Model\OsVersionInfo[] + */ + public function getVersionList() + { + return $this->container['versionList']; + } + + /** + * Sets versionList + * + * @param \G42Cloud\SDK\Ims\V2\Model\OsVersionInfo[] $versionList 操作系统的详情值 + * + * @return $this + */ + public function setVersionList($versionList) + { + $this->container['versionList'] = $versionList; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListTagsRequest.php b/Services/Ims/V2/Model/ListTagsRequest.php new file mode 100755 index 0000000..ba3fe8f --- /dev/null +++ b/Services/Ims/V2/Model/ListTagsRequest.php @@ -0,0 +1,909 @@ + 'int', + 'page' => 'int', + 'imagetype' => 'string', + 'id' => 'string', + 'status' => 'string', + 'name' => 'string', + 'minDisk' => 'int', + 'platform' => 'string', + 'osType' => 'string', + 'memberStatus' => 'string', + 'virtualEnvType' => 'string', + 'enterpriseProjectId' => 'string', + 'architecture' => 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * limit 用于分页,表示查询几条记录,取值为整数,默认为所有。 + * page 页码,表示需要查询第几页的数据。默认值为1。 + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * id 镜像ID。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * name 镜像名称。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。 + * platform 镜像平台分类。 + * osType 镜像系统类型,取值如下:Linux,Windows,Other + * memberStatus 成员状态。目前取值有accepted、rejected、pending。 + * virtualEnvType 镜像使用环境类型:FusionCompute、Ironic、DataImage。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 + * architecture 镜像架构类型。取值包括:x86,arm + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'limit' => 'int32', + 'page' => 'int32', + 'imagetype' => null, + 'id' => null, + 'status' => null, + 'name' => null, + 'minDisk' => 'int32', + 'platform' => null, + 'osType' => null, + 'memberStatus' => null, + 'virtualEnvType' => null, + 'enterpriseProjectId' => null, + 'architecture' => null, + 'createdAt' => null, + 'updatedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * limit 用于分页,表示查询几条记录,取值为整数,默认为所有。 + * page 页码,表示需要查询第几页的数据。默认值为1。 + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * id 镜像ID。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * name 镜像名称。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。 + * platform 镜像平台分类。 + * osType 镜像系统类型,取值如下:Linux,Windows,Other + * memberStatus 成员状态。目前取值有accepted、rejected、pending。 + * virtualEnvType 镜像使用环境类型:FusionCompute、Ironic、DataImage。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 + * architecture 镜像架构类型。取值包括:x86,arm + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $attributeMap = [ + 'limit' => 'limit', + 'page' => 'page', + 'imagetype' => '__imagetype', + 'id' => 'id', + 'status' => 'status', + 'name' => 'name', + 'minDisk' => 'min_disk', + 'platform' => '__platform', + 'osType' => '__os_type', + 'memberStatus' => 'member_status', + 'virtualEnvType' => 'virtual_env_type', + 'enterpriseProjectId' => 'enterprise_project_id', + 'architecture' => 'architecture', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * limit 用于分页,表示查询几条记录,取值为整数,默认为所有。 + * page 页码,表示需要查询第几页的数据。默认值为1。 + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * id 镜像ID。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * name 镜像名称。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。 + * platform 镜像平台分类。 + * osType 镜像系统类型,取值如下:Linux,Windows,Other + * memberStatus 成员状态。目前取值有accepted、rejected、pending。 + * virtualEnvType 镜像使用环境类型:FusionCompute、Ironic、DataImage。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 + * architecture 镜像架构类型。取值包括:x86,arm + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $setters = [ + 'limit' => 'setLimit', + 'page' => 'setPage', + 'imagetype' => 'setImagetype', + 'id' => 'setId', + 'status' => 'setStatus', + 'name' => 'setName', + 'minDisk' => 'setMinDisk', + 'platform' => 'setPlatform', + 'osType' => 'setOsType', + 'memberStatus' => 'setMemberStatus', + 'virtualEnvType' => 'setVirtualEnvType', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'architecture' => 'setArchitecture', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * limit 用于分页,表示查询几条记录,取值为整数,默认为所有。 + * page 页码,表示需要查询第几页的数据。默认值为1。 + * imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * id 镜像ID。 + * status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * name 镜像名称。 + * minDisk 镜像运行需要的最小磁盘,单位为GB 。 + * platform 镜像平台分类。 + * osType 镜像系统类型,取值如下:Linux,Windows,Other + * memberStatus 成员状态。目前取值有accepted、rejected、pending。 + * virtualEnvType 镜像使用环境类型:FusionCompute、Ironic、DataImage。 + * enterpriseProjectId 表示查询某个企业项目下的镜像。 + * architecture 镜像架构类型。取值包括:x86,arm + * createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @var string[] + */ + protected static $getters = [ + 'limit' => 'getLimit', + 'page' => 'getPage', + 'imagetype' => 'getImagetype', + 'id' => 'getId', + 'status' => 'getStatus', + 'name' => 'getName', + 'minDisk' => 'getMinDisk', + 'platform' => 'getPlatform', + 'osType' => 'getOsType', + 'memberStatus' => 'getMemberStatus', + 'virtualEnvType' => 'getVirtualEnvType', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'architecture' => 'getArchitecture', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const IMAGETYPE_MARKET = 'market'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const MEMBER_STATUS_ACCEPTED = 'accepted'; + const MEMBER_STATUS_REJECTED = 'rejected'; + const MEMBER_STATUS_PENDING = 'pending'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + const ARCHITECTURE_X86 = 'x86'; + const ARCHITECTURE_ARM = 'arm'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + self::IMAGETYPE_MARKET, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMemberStatusAllowableValues() + { + return [ + self::MEMBER_STATUS_ACCEPTED, + self::MEMBER_STATUS_REJECTED, + self::MEMBER_STATUS_PENDING, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArchitectureAllowableValues() + { + return [ + self::ARCHITECTURE_X86, + self::ARCHITECTURE_ARM, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : null; + $this->container['page'] = isset($data['page']) ? $data['page'] : 1; + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['memberStatus'] = isset($data['memberStatus']) ? $data['memberStatus'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['architecture'] = isset($data['architecture']) ? $data['architecture'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getMemberStatusAllowableValues(); + if (!is_null($this->container['memberStatus']) && !in_array($this->container['memberStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'memberStatus', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getArchitectureAllowableValues(); + if (!is_null($this->container['architecture']) && !in_array($this->container['architecture'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'architecture', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets limit + * 用于分页,表示查询几条记录,取值为整数,默认为所有。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 用于分页,表示查询几条记录,取值为整数,默认为所有。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets page + * 页码,表示需要查询第几页的数据。默认值为1。 + * + * @return int|null + */ + public function getPage() + { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page 页码,表示需要查询第几页的数据。默认值为1。 + * + * @return $this + */ + public function setPage($page) + { + $this->container['page'] = $page; + return $this; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return string|null + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string|null $imagetype 镜像类型,目前支持以下类型:公共镜像:gold私有镜像:private共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets id + * 镜像ID。 + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 镜像ID。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets name + * 镜像名称。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘,单位为GB 。 + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘,单位为GB 。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets platform + * 镜像平台分类。 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类。 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets osType + * 镜像系统类型,取值如下:Linux,Windows,Other + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 镜像系统类型,取值如下:Linux,Windows,Other + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets memberStatus + * 成员状态。目前取值有accepted、rejected、pending。 + * + * @return string|null + */ + public function getMemberStatus() + { + return $this->container['memberStatus']; + } + + /** + * Sets memberStatus + * + * @param string|null $memberStatus 成员状态。目前取值有accepted、rejected、pending。 + * + * @return $this + */ + public function setMemberStatus($memberStatus) + { + $this->container['memberStatus'] = $memberStatus; + return $this; + } + + /** + * Gets virtualEnvType + * 镜像使用环境类型:FusionCompute、Ironic、DataImage。 + * + * @return string|null + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string|null $virtualEnvType 镜像使用环境类型:FusionCompute、Ironic、DataImage。 + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示查询某个企业项目下的镜像。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示查询某个企业项目下的镜像。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets architecture + * 镜像架构类型。取值包括:x86,arm + * + * @return string|null + */ + public function getArchitecture() + { + return $this->container['architecture']; + } + + /** + * Sets architecture + * + * @param string|null $architecture 镜像架构类型。取值包括:x86,arm + * + * @return $this + */ + public function setArchitecture($architecture) + { + $this->container['architecture'] = $architecture; + return $this; + } + + /** + * Gets createdAt + * 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets updatedAt + * 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 镜像修改时间。支持按照时间点过滤查询,取值格式为“ 操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询修改时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: updated_at=gt:2018-10-28T10:00:00Z + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListTagsResponse.php b/Services/Ims/V2/Model/ListTagsResponse.php new file mode 100755 index 0000000..e41649c --- /dev/null +++ b/Services/Ims/V2/Model/ListTagsResponse.php @@ -0,0 +1,266 @@ + 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tags 标签列表 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tags 标签列表 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tags 标签列表 + * + * @var string[] + */ + protected static $setters = [ + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tags 标签列表 + * + * @var string[] + */ + protected static $getters = [ + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tags + * 标签列表 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 标签列表 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListVersionsRequest.php b/Services/Ims/V2/Model/ListVersionsRequest.php new file mode 100755 index 0000000..43fa3ad --- /dev/null +++ b/Services/Ims/V2/Model/ListVersionsRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ListVersionsResponse.php b/Services/Ims/V2/Model/ListVersionsResponse.php new file mode 100755 index 0000000..99f5c0a --- /dev/null +++ b/Services/Ims/V2/Model/ListVersionsResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Ims\V2\Model\OsVersionResponse[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * versions 版本信息 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'versions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * versions 版本信息 + * + * @var string[] + */ + protected static $attributeMap = [ + 'versions' => 'versions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * versions 版本信息 + * + * @var string[] + */ + protected static $setters = [ + 'versions' => 'setVersions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * versions 版本信息 + * + * @var string[] + */ + protected static $getters = [ + 'versions' => 'getVersions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['versions'] = isset($data['versions']) ? $data['versions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets versions + * 版本信息 + * + * @return \G42Cloud\SDK\Ims\V2\Model\OsVersionResponse[]|null + */ + public function getVersions() + { + return $this->container['versions']; + } + + /** + * Sets versions + * + * @param \G42Cloud\SDK\Ims\V2\Model\OsVersionResponse[]|null $versions 版本信息 + * + * @return $this + */ + public function setVersions($versions) + { + $this->container['versions'] = $versions; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/OsVersionInfo.php b/Services/Ims/V2/Model/OsVersionInfo.php new file mode 100755 index 0000000..a6398f0 --- /dev/null +++ b/Services/Ims/V2/Model/OsVersionInfo.php @@ -0,0 +1,420 @@ + 'string', + 'osVersionKey' => 'string', + 'osVersion' => 'string', + 'osBit' => 'int', + 'osType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * platform 操作系统的平台值 + * osVersionKey os_version的key值,和os_version值相同 + * osVersion 操作系统的版本 + * osBit 操作系统的位数 + * osType 操作系统的类型,Linux或Windows + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'platform' => null, + 'osVersionKey' => null, + 'osVersion' => null, + 'osBit' => 'int32', + 'osType' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * platform 操作系统的平台值 + * osVersionKey os_version的key值,和os_version值相同 + * osVersion 操作系统的版本 + * osBit 操作系统的位数 + * osType 操作系统的类型,Linux或Windows + * + * @var string[] + */ + protected static $attributeMap = [ + 'platform' => 'platform', + 'osVersionKey' => 'os_version_key', + 'osVersion' => 'os_version', + 'osBit' => 'os_bit', + 'osType' => 'os_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * platform 操作系统的平台值 + * osVersionKey os_version的key值,和os_version值相同 + * osVersion 操作系统的版本 + * osBit 操作系统的位数 + * osType 操作系统的类型,Linux或Windows + * + * @var string[] + */ + protected static $setters = [ + 'platform' => 'setPlatform', + 'osVersionKey' => 'setOsVersionKey', + 'osVersion' => 'setOsVersion', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * platform 操作系统的平台值 + * osVersionKey os_version的key值,和os_version值相同 + * osVersion 操作系统的版本 + * osBit 操作系统的位数 + * osType 操作系统的类型,Linux或Windows + * + * @var string[] + */ + protected static $getters = [ + 'platform' => 'getPlatform', + 'osVersionKey' => 'getOsVersionKey', + 'osVersion' => 'getOsVersion', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['osVersionKey'] = isset($data['osVersionKey']) ? $data['osVersionKey'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['platform'] === null) { + $invalidProperties[] = "'platform' can't be null"; + } + if ($this->container['osVersionKey'] === null) { + $invalidProperties[] = "'osVersionKey' can't be null"; + } + if ($this->container['osVersion'] === null) { + $invalidProperties[] = "'osVersion' can't be null"; + } + if ($this->container['osBit'] === null) { + $invalidProperties[] = "'osBit' can't be null"; + } + if ($this->container['osType'] === null) { + $invalidProperties[] = "'osType' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets platform + * 操作系统的平台值 + * + * @return string + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string $platform 操作系统的平台值 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets osVersionKey + * os_version的key值,和os_version值相同 + * + * @return string + */ + public function getOsVersionKey() + { + return $this->container['osVersionKey']; + } + + /** + * Sets osVersionKey + * + * @param string $osVersionKey os_version的key值,和os_version值相同 + * + * @return $this + */ + public function setOsVersionKey($osVersionKey) + { + $this->container['osVersionKey'] = $osVersionKey; + return $this; + } + + /** + * Gets osVersion + * 操作系统的版本 + * + * @return string + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string $osVersion 操作系统的版本 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets osBit + * 操作系统的位数 + * + * @return int + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param int $osBit 操作系统的位数 + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 操作系统的类型,Linux或Windows + * + * @return string + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string $osType 操作系统的类型,Linux或Windows + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/OsVersionResponse.php b/Services/Ims/V2/Model/OsVersionResponse.php new file mode 100755 index 0000000..0bea6eb --- /dev/null +++ b/Services/Ims/V2/Model/OsVersionResponse.php @@ -0,0 +1,338 @@ + 'string', + 'id' => 'string', + 'links' => '\G42Cloud\SDK\Ims\V2\Model\Links[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 接口状态。 + * id 接口ID。 + * links 自描述信息。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'id' => null, + 'links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 接口状态。 + * id 接口ID。 + * links 自描述信息。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'id' => 'id', + 'links' => 'links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 接口状态。 + * id 接口ID。 + * links 自描述信息。 + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'id' => 'setId', + 'links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 接口状态。 + * id 接口ID。 + * links 自描述信息。 + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'id' => 'getId', + 'links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['links'] = isset($data['links']) ? $data['links'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 接口状态。 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 接口状态。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets id + * 接口ID。 + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 接口ID。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets links + * 自描述信息。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\Links[]|null + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \G42Cloud\SDK\Ims\V2\Model\Links[]|null $links 自描述信息。 + * + * @return $this + */ + public function setLinks($links) + { + $this->container['links'] = $links; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/QueryImageByTagsResourceDetail.php b/Services/Ims/V2/Model/QueryImageByTagsResourceDetail.php new file mode 100755 index 0000000..cc80560 --- /dev/null +++ b/Services/Ims/V2/Model/QueryImageByTagsResourceDetail.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 镜像状态 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 镜像状态 + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 镜像状态 + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 镜像状态 + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 镜像状态 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 镜像状态 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/QuickImportImageByFileRequestBody.php b/Services/Ims/V2/Model/QuickImportImageByFileRequestBody.php new file mode 100755 index 0000000..e1c086a --- /dev/null +++ b/Services/Ims/V2/Model/QuickImportImageByFileRequestBody.php @@ -0,0 +1,716 @@ +,长度不能超过1024个字符。默认为空。 + * osVersion 操作系统版本。使用上传至OBS桶中的外部镜像文件制作镜像时生效 + * imageUrl OBS桶中外部镜像文件地址。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。注意:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小系统盘大小。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为1至1024GB。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * type 制作的镜像类型。系统盘镜像为ECS/BMS,数据盘镜像为DataImage. 制作数据盘镜像时该参数必选. + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 + * osType 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'description' => 'string', + 'osVersion' => 'string', + 'imageUrl' => 'string', + 'minDisk' => 'int', + 'tags' => 'string[]', + 'type' => 'string', + 'enterpriseProjectId' => 'string', + 'architecture' => 'string', + 'osType' => 'string', + 'imageTags' => '\G42Cloud\SDK\Ims\V2\Model\ResourceTag[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * name 镜像名称 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * osVersion 操作系统版本。使用上传至OBS桶中的外部镜像文件制作镜像时生效 + * imageUrl OBS桶中外部镜像文件地址。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。注意:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小系统盘大小。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为1至1024GB。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * type 制作的镜像类型。系统盘镜像为ECS/BMS,数据盘镜像为DataImage. 制作数据盘镜像时该参数必选. + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 + * osType 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'osVersion' => null, + 'imageUrl' => null, + 'minDisk' => 'int32', + 'tags' => null, + 'type' => null, + 'enterpriseProjectId' => null, + 'architecture' => null, + 'osType' => null, + 'imageTags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * name 镜像名称 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * osVersion 操作系统版本。使用上传至OBS桶中的外部镜像文件制作镜像时生效 + * imageUrl OBS桶中外部镜像文件地址。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。注意:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小系统盘大小。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为1至1024GB。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * type 制作的镜像类型。系统盘镜像为ECS/BMS,数据盘镜像为DataImage. 制作数据盘镜像时该参数必选. + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 + * osType 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'osVersion' => 'os_version', + 'imageUrl' => 'image_url', + 'minDisk' => 'min_disk', + 'tags' => 'tags', + 'type' => 'type', + 'enterpriseProjectId' => 'enterprise_project_id', + 'architecture' => 'architecture', + 'osType' => 'os_type', + 'imageTags' => 'image_tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * name 镜像名称 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * osVersion 操作系统版本。使用上传至OBS桶中的外部镜像文件制作镜像时生效 + * imageUrl OBS桶中外部镜像文件地址。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。注意:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小系统盘大小。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为1至1024GB。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * type 制作的镜像类型。系统盘镜像为ECS/BMS,数据盘镜像为DataImage. 制作数据盘镜像时该参数必选. + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 + * osType 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'osVersion' => 'setOsVersion', + 'imageUrl' => 'setImageUrl', + 'minDisk' => 'setMinDisk', + 'tags' => 'setTags', + 'type' => 'setType', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'architecture' => 'setArchitecture', + 'osType' => 'setOsType', + 'imageTags' => 'setImageTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * name 镜像名称 + * description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * osVersion 操作系统版本。使用上传至OBS桶中的外部镜像文件制作镜像时生效 + * imageUrl OBS桶中外部镜像文件地址。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。注意:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * minDisk 最小系统盘大小。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为1至1024GB。 + * tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * type 制作的镜像类型。系统盘镜像为ECS/BMS,数据盘镜像为DataImage. 制作数据盘镜像时该参数必选. + * enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 + * osType 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 + * imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'osVersion' => 'getOsVersion', + 'imageUrl' => 'getImageUrl', + 'minDisk' => 'getMinDisk', + 'tags' => 'getTags', + 'type' => 'getType', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'architecture' => 'getArchitecture', + 'osType' => 'getOsType', + 'imageTags' => 'getImageTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const TYPE_ECS = 'ECS'; + const TYPE_BMS = 'BMS'; + const TYPE_DATA_IMAGE = 'DataImage'; + const ARCHITECTURE_X86 = 'x86'; + const ARCHITECTURE_ARM = 'arm'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_ECS, + self::TYPE_BMS, + self::TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArchitectureAllowableValues() + { + return [ + self::ARCHITECTURE_X86, + self::ARCHITECTURE_ARM, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'ECS'; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : '0'; + $this->container['architecture'] = isset($data['architecture']) ? $data['architecture'] : 'x86'; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['imageTags'] = isset($data['imageTags']) ? $data['imageTags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 128)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 128."; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + if ($this->container['osVersion'] === null) { + $invalidProperties[] = "'osVersion' can't be null"; + } + if ($this->container['imageUrl'] === null) { + $invalidProperties[] = "'imageUrl' can't be null"; + } + if ($this->container['minDisk'] === null) { + $invalidProperties[] = "'minDisk' can't be null"; + } + if (($this->container['minDisk'] > 1024)) { + $invalidProperties[] = "invalid value for 'minDisk', must be smaller than or equal to 1024."; + } + if (($this->container['minDisk'] < 1)) { + $invalidProperties[] = "invalid value for 'minDisk', must be bigger than or equal to 1."; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getArchitectureAllowableValues(); + if (!is_null($this->container['architecture']) && !in_array($this->container['architecture'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'architecture', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * 镜像名称 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 镜像名称 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets description + * 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。_description参数说明请参考镜像属性。支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。默认为空。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets osVersion + * 操作系统版本。使用上传至OBS桶中的外部镜像文件制作镜像时生效 + * + * @return string + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string $osVersion 操作系统版本。使用上传至OBS桶中的外部镜像文件制作镜像时生效 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets imageUrl + * OBS桶中外部镜像文件地址。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。注意:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * + * @return string + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string $imageUrl OBS桶中外部镜像文件地址。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。格式为:。注意:此处的OBS桶和镜像文件的存储类别必须是OBS标准存储。 + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + return $this; + } + + /** + * Gets minDisk + * 最小系统盘大小。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为1至1024GB。 + * + * @return int + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int $minDisk 最小系统盘大小。在使用OBS桶的外部镜像文件制作镜像时生效且为必选字段。取值为1至1024GB。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets tags + * 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets type + * 制作的镜像类型。系统盘镜像为ECS/BMS,数据盘镜像为DataImage. 制作数据盘镜像时该参数必选. + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type 制作的镜像类型。系统盘镜像为ECS/BMS,数据盘镜像为DataImage. 制作数据盘镜像时该参数必选. + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。 取值为0或无该值,表示属于default企业项目。 取值为UUID,表示属于该UUID对应的企业项目。 关于企业项目ID的获取及企业项目特性的详细信息,请参考《企业管理用户指南》。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets architecture + * 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 + * + * @return string|null + */ + public function getArchitecture() + { + return $this->container['architecture']; + } + + /** + * Sets architecture + * + * @param string|null $architecture 镜像的架构类型。取值包括: x86 arm 默认使用“x86”。 + * + * @return $this + */ + public function setArchitecture($architecture) + { + $this->container['architecture'] = $architecture; + return $this; + } + + /** + * Gets osType + * 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets imageTags + * 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\ResourceTag[]|null + */ + public function getImageTags() + { + return $this->container['imageTags']; + } + + /** + * Sets imageTags + * + * @param \G42Cloud\SDK\Ims\V2\Model\ResourceTag[]|null $imageTags 新规范的镜像标签列表。默认为空。 tags和image_tags只能使用一个。 + * + * @return $this + */ + public function setImageTags($imageTags) + { + $this->container['imageTags'] = $imageTags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/Quota.php b/Services/Ims/V2/Model/Quota.php new file mode 100755 index 0000000..b1e5eb6 --- /dev/null +++ b/Services/Ims/V2/Model/Quota.php @@ -0,0 +1,268 @@ + '\G42Cloud\SDK\Ims\V2\Model\QuotaInfo[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resources 查询的配额信息。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resources' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resources 查询的配额信息。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resources' => 'resources' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resources 查询的配额信息。 + * + * @var string[] + */ + protected static $setters = [ + 'resources' => 'setResources' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resources 查询的配额信息。 + * + * @var string[] + */ + protected static $getters = [ + 'resources' => 'getResources' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resources'] = isset($data['resources']) ? $data['resources'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resources'] === null) { + $invalidProperties[] = "'resources' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resources + * 查询的配额信息。 + * + * @return \G42Cloud\SDK\Ims\V2\Model\QuotaInfo[] + */ + public function getResources() + { + return $this->container['resources']; + } + + /** + * Sets resources + * + * @param \G42Cloud\SDK\Ims\V2\Model\QuotaInfo[] $resources 查询的配额信息。 + * + * @return $this + */ + public function setResources($resources) + { + $this->container['resources'] = $resources; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/QuotaInfo.php b/Services/Ims/V2/Model/QuotaInfo.php new file mode 100755 index 0000000..52f7a7e --- /dev/null +++ b/Services/Ims/V2/Model/QuotaInfo.php @@ -0,0 +1,420 @@ + 'string', + 'used' => 'int', + 'quota' => 'int', + 'min' => 'int', + 'max' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * type 查询的资源类型。 + * used 已使用的资源配额。 + * quota 查询出的资源的总配额。 + * min 资源的最小配额。 + * max 资源的最大配额。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'type' => null, + 'used' => 'int32', + 'quota' => 'int32', + 'min' => 'int32', + 'max' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * type 查询的资源类型。 + * used 已使用的资源配额。 + * quota 查询出的资源的总配额。 + * min 资源的最小配额。 + * max 资源的最大配额。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'used' => 'used', + 'quota' => 'quota', + 'min' => 'min', + 'max' => 'max' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * type 查询的资源类型。 + * used 已使用的资源配额。 + * quota 查询出的资源的总配额。 + * min 资源的最小配额。 + * max 资源的最大配额。 + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'used' => 'setUsed', + 'quota' => 'setQuota', + 'min' => 'setMin', + 'max' => 'setMax' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * type 查询的资源类型。 + * used 已使用的资源配额。 + * quota 查询出的资源的总配额。 + * min 资源的最小配额。 + * max 资源的最大配额。 + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'used' => 'getUsed', + 'quota' => 'getQuota', + 'min' => 'getMin', + 'max' => 'getMax' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['used'] = isset($data['used']) ? $data['used'] : null; + $this->container['quota'] = isset($data['quota']) ? $data['quota'] : null; + $this->container['min'] = isset($data['min']) ? $data['min'] : null; + $this->container['max'] = isset($data['max']) ? $data['max'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['used'] === null) { + $invalidProperties[] = "'used' can't be null"; + } + if ($this->container['quota'] === null) { + $invalidProperties[] = "'quota' can't be null"; + } + if ($this->container['min'] === null) { + $invalidProperties[] = "'min' can't be null"; + } + if ($this->container['max'] === null) { + $invalidProperties[] = "'max' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * 查询的资源类型。 + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type 查询的资源类型。 + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + return $this; + } + + /** + * Gets used + * 已使用的资源配额。 + * + * @return int + */ + public function getUsed() + { + return $this->container['used']; + } + + /** + * Sets used + * + * @param int $used 已使用的资源配额。 + * + * @return $this + */ + public function setUsed($used) + { + $this->container['used'] = $used; + return $this; + } + + /** + * Gets quota + * 查询出的资源的总配额。 + * + * @return int + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param int $quota 查询出的资源的总配额。 + * + * @return $this + */ + public function setQuota($quota) + { + $this->container['quota'] = $quota; + return $this; + } + + /** + * Gets min + * 资源的最小配额。 + * + * @return int + */ + public function getMin() + { + return $this->container['min']; + } + + /** + * Sets min + * + * @param int $min 资源的最小配额。 + * + * @return $this + */ + public function setMin($min) + { + $this->container['min'] = $min; + return $this; + } + + /** + * Gets max + * 资源的最大配额。 + * + * @return int + */ + public function getMax() + { + return $this->container['max']; + } + + /** + * Sets max + * + * @param int $max 资源的最大配额。 + * + * @return $this + */ + public function setMax($max) + { + $this->container['max'] = $max; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/RegisterImageRequest.php b/Services/Ims/V2/Model/RegisterImageRequest.php new file mode 100755 index 0000000..6a169eb --- /dev/null +++ b/Services/Ims/V2/Model/RegisterImageRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\RegisterImageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID。 image_id为用户调用创建镜像元数据接口所创建出来镜像的id,使用其他方式创建的镜像id会导致注册失败。 注册接口调用成功后,请根据镜像id查询镜像的状态。镜像状态变为active表示镜像注册成功,详情请参见查询镜像详情(OpenStack原生)。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID。 image_id为用户调用创建镜像元数据接口所创建出来镜像的id,使用其他方式创建的镜像id会导致注册失败。 注册接口调用成功后,请根据镜像id查询镜像的状态。镜像状态变为active表示镜像注册成功,详情请参见查询镜像详情(OpenStack原生)。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID。 image_id为用户调用创建镜像元数据接口所创建出来镜像的id,使用其他方式创建的镜像id会导致注册失败。 注册接口调用成功后,请根据镜像id查询镜像的状态。镜像状态变为active表示镜像注册成功,详情请参见查询镜像详情(OpenStack原生)。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID。 image_id为用户调用创建镜像元数据接口所创建出来镜像的id,使用其他方式创建的镜像id会导致注册失败。 注册接口调用成功后,请根据镜像id查询镜像的状态。镜像状态变为active表示镜像注册成功,详情请参见查询镜像详情(OpenStack原生)。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID。 image_id为用户调用创建镜像元数据接口所创建出来镜像的id,使用其他方式创建的镜像id会导致注册失败。 注册接口调用成功后,请根据镜像id查询镜像的状态。镜像状态变为active表示镜像注册成功,详情请参见查询镜像详情(OpenStack原生)。 + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID。 image_id为用户调用创建镜像元数据接口所创建出来镜像的id,使用其他方式创建的镜像id会导致注册失败。 注册接口调用成功后,请根据镜像id查询镜像的状态。镜像状态变为active表示镜像注册成功,详情请参见查询镜像详情(OpenStack原生)。 + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\RegisterImageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\RegisterImageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/RegisterImageRequestBody.php b/Services/Ims/V2/Model/RegisterImageRequestBody.php new file mode 100755 index 0000000..4638b54 --- /dev/null +++ b/Services/Ims/V2/Model/RegisterImageRequestBody.php @@ -0,0 +1,268 @@ +: image_url对应的镜像桶中的文件,镜像文件格式的取值范围为:ZVHD、QCOW2、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2、VMDK。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'imageUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageUrl 源镜像的URL,格式:: image_url对应的镜像桶中的文件,镜像文件格式的取值范围为:ZVHD、QCOW2、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2、VMDK。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageUrl' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageUrl 源镜像的URL,格式:: image_url对应的镜像桶中的文件,镜像文件格式的取值范围为:ZVHD、QCOW2、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2、VMDK。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageUrl' => 'image_url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageUrl 源镜像的URL,格式:: image_url对应的镜像桶中的文件,镜像文件格式的取值范围为:ZVHD、QCOW2、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2、VMDK。 + * + * @var string[] + */ + protected static $setters = [ + 'imageUrl' => 'setImageUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageUrl 源镜像的URL,格式:: image_url对应的镜像桶中的文件,镜像文件格式的取值范围为:ZVHD、QCOW2、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2、VMDK。 + * + * @var string[] + */ + protected static $getters = [ + 'imageUrl' => 'getImageUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageUrl'] === null) { + $invalidProperties[] = "'imageUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageUrl + * 源镜像的URL,格式:: image_url对应的镜像桶中的文件,镜像文件格式的取值范围为:ZVHD、QCOW2、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2、VMDK。 + * + * @return string + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string $imageUrl 源镜像的URL,格式:: image_url对应的镜像桶中的文件,镜像文件格式的取值范围为:ZVHD、QCOW2、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2、VMDK。 + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/RegisterImageResponse.php b/Services/Ims/V2/Model/RegisterImageResponse.php new file mode 100755 index 0000000..bcbc951 --- /dev/null +++ b/Services/Ims/V2/Model/RegisterImageResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID。 + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 异步任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ResourceTag.php b/Services/Ims/V2/Model/ResourceTag.php new file mode 100755 index 0000000..70b2e89 --- /dev/null +++ b/Services/Ims/V2/Model/ResourceTag.php @@ -0,0 +1,306 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 标签的键 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 标签的键 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets value + * 标签的值 + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 标签的值 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowImageByTagsResource.php b/Services/Ims/V2/Model/ShowImageByTagsResource.php new file mode 100755 index 0000000..aa0fc81 --- /dev/null +++ b/Services/Ims/V2/Model/ShowImageByTagsResource.php @@ -0,0 +1,382 @@ + 'string', + 'resourceDetail' => '\G42Cloud\SDK\Ims\V2\Model\QueryImageByTagsResourceDetail', + 'tags' => '\G42Cloud\SDK\Ims\V2\Model\TagKeyValue[]', + 'resourceName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceId 镜像ID + * resourceDetail resourceDetail + * tags 镜像的标签列表 + * resourceName 镜像名称 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceId' => null, + 'resourceDetail' => null, + 'tags' => null, + 'resourceName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceId 镜像ID + * resourceDetail resourceDetail + * tags 镜像的标签列表 + * resourceName 镜像名称 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceId' => 'resource_id', + 'resourceDetail' => 'resource_detail', + 'tags' => 'tags', + 'resourceName' => 'resource_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceId 镜像ID + * resourceDetail resourceDetail + * tags 镜像的标签列表 + * resourceName 镜像名称 + * + * @var string[] + */ + protected static $setters = [ + 'resourceId' => 'setResourceId', + 'resourceDetail' => 'setResourceDetail', + 'tags' => 'setTags', + 'resourceName' => 'setResourceName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceId 镜像ID + * resourceDetail resourceDetail + * tags 镜像的标签列表 + * resourceName 镜像名称 + * + * @var string[] + */ + protected static $getters = [ + 'resourceId' => 'getResourceId', + 'resourceDetail' => 'getResourceDetail', + 'tags' => 'getTags', + 'resourceName' => 'getResourceName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceId'] = isset($data['resourceId']) ? $data['resourceId'] : null; + $this->container['resourceDetail'] = isset($data['resourceDetail']) ? $data['resourceDetail'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['resourceName'] = isset($data['resourceName']) ? $data['resourceName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceId'] === null) { + $invalidProperties[] = "'resourceId' can't be null"; + } + if ($this->container['resourceDetail'] === null) { + $invalidProperties[] = "'resourceDetail' can't be null"; + } + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['resourceName'] === null) { + $invalidProperties[] = "'resourceName' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceId + * 镜像ID + * + * @return string + */ + public function getResourceId() + { + return $this->container['resourceId']; + } + + /** + * Sets resourceId + * + * @param string $resourceId 镜像ID + * + * @return $this + */ + public function setResourceId($resourceId) + { + $this->container['resourceId'] = $resourceId; + return $this; + } + + /** + * Gets resourceDetail + * resourceDetail + * + * @return \G42Cloud\SDK\Ims\V2\Model\QueryImageByTagsResourceDetail + */ + public function getResourceDetail() + { + return $this->container['resourceDetail']; + } + + /** + * Sets resourceDetail + * + * @param \G42Cloud\SDK\Ims\V2\Model\QueryImageByTagsResourceDetail $resourceDetail resourceDetail + * + * @return $this + */ + public function setResourceDetail($resourceDetail) + { + $this->container['resourceDetail'] = $resourceDetail; + return $this; + } + + /** + * Gets tags + * 镜像的标签列表 + * + * @return \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Ims\V2\Model\TagKeyValue[] $tags 镜像的标签列表 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets resourceName + * 镜像名称 + * + * @return string + */ + public function getResourceName() + { + return $this->container['resourceName']; + } + + /** + * Sets resourceName + * + * @param string $resourceName 镜像名称 + * + * @return $this + */ + public function setResourceName($resourceName) + { + $this->container['resourceName'] = $resourceName; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowImageQuotaRequest.php b/Services/Ims/V2/Model/ShowImageQuotaRequest.php new file mode 100755 index 0000000..580b2a2 --- /dev/null +++ b/Services/Ims/V2/Model/ShowImageQuotaRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowImageQuotaResponse.php b/Services/Ims/V2/Model/ShowImageQuotaResponse.php new file mode 100755 index 0000000..f407c45 --- /dev/null +++ b/Services/Ims/V2/Model/ShowImageQuotaResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Ims\V2\Model\Quota' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * quotas quotas + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'quotas' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * quotas quotas + * + * @var string[] + */ + protected static $attributeMap = [ + 'quotas' => 'quotas' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * quotas quotas + * + * @var string[] + */ + protected static $setters = [ + 'quotas' => 'setQuotas' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * quotas quotas + * + * @var string[] + */ + protected static $getters = [ + 'quotas' => 'getQuotas' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['quotas'] = isset($data['quotas']) ? $data['quotas'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets quotas + * quotas + * + * @return \G42Cloud\SDK\Ims\V2\Model\Quota|null + */ + public function getQuotas() + { + return $this->container['quotas']; + } + + /** + * Sets quotas + * + * @param \G42Cloud\SDK\Ims\V2\Model\Quota|null $quotas quotas + * + * @return $this + */ + public function setQuotas($quotas) + { + $this->container['quotas'] = $quotas; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowJobProgressRequest.php b/Services/Ims/V2/Model/ShowJobProgressRequest.php new file mode 100755 index 0000000..c26a7f6 --- /dev/null +++ b/Services/Ims/V2/Model/ShowJobProgressRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['jobId'] === null) { + $invalidProperties[] = "'jobId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID + * + * @return string + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string $jobId 异步任务ID + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowJobProgressResponse.php b/Services/Ims/V2/Model/ShowJobProgressResponse.php new file mode 100755 index 0000000..b84c84c --- /dev/null +++ b/Services/Ims/V2/Model/ShowJobProgressResponse.php @@ -0,0 +1,538 @@ + 'string', + 'jobId' => 'string', + 'jobType' => 'string', + 'beginTime' => 'string', + 'endTime' => 'string', + 'errorCode' => 'string', + 'failReason' => 'string', + 'entities' => '\G42Cloud\SDK\Ims\V2\Model\JobProgressEntities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'jobId' => null, + 'jobType' => null, + 'beginTime' => null, + 'endTime' => null, + 'errorCode' => null, + 'failReason' => null, + 'entities' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'jobId' => 'job_id', + 'jobType' => 'job_type', + 'beginTime' => 'begin_time', + 'endTime' => 'end_time', + 'errorCode' => 'error_code', + 'failReason' => 'fail_reason', + 'entities' => 'entities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'jobId' => 'setJobId', + 'jobType' => 'setJobType', + 'beginTime' => 'setBeginTime', + 'endTime' => 'setEndTime', + 'errorCode' => 'setErrorCode', + 'failReason' => 'setFailReason', + 'entities' => 'setEntities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'jobId' => 'getJobId', + 'jobType' => 'getJobType', + 'beginTime' => 'getBeginTime', + 'endTime' => 'getEndTime', + 'errorCode' => 'getErrorCode', + 'failReason' => 'getFailReason', + 'entities' => 'getEntities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const STATUS_SUCCESS = 'SUCCESS'; + const STATUS_FAIL = 'FAIL'; + const STATUS_RUNNING = 'RUNNING'; + const STATUS_INIT = 'INIT'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_SUCCESS, + self::STATUS_FAIL, + self::STATUS_RUNNING, + self::STATUS_INIT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + $this->container['jobType'] = isset($data['jobType']) ? $data['jobType'] : null; + $this->container['beginTime'] = isset($data['beginTime']) ? $data['beginTime'] : null; + $this->container['endTime'] = isset($data['endTime']) ? $data['endTime'] : null; + $this->container['errorCode'] = isset($data['errorCode']) ? $data['errorCode'] : null; + $this->container['failReason'] = isset($data['failReason']) ? $data['failReason'] : null; + $this->container['entities'] = isset($data['entities']) ? $data['entities'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets jobId + * 任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Gets jobType + * 任务类型。 + * + * @return string|null + */ + public function getJobType() + { + return $this->container['jobType']; + } + + /** + * Sets jobType + * + * @param string|null $jobType 任务类型。 + * + * @return $this + */ + public function setJobType($jobType) + { + $this->container['jobType'] = $jobType; + return $this; + } + + /** + * Gets beginTime + * 任务开始执行时间。格式为UTC时间。 + * + * @return string|null + */ + public function getBeginTime() + { + return $this->container['beginTime']; + } + + /** + * Sets beginTime + * + * @param string|null $beginTime 任务开始执行时间。格式为UTC时间。 + * + * @return $this + */ + public function setBeginTime($beginTime) + { + $this->container['beginTime'] = $beginTime; + return $this; + } + + /** + * Gets endTime + * 任务结束时间。格式为UTC时间。 + * + * @return string|null + */ + public function getEndTime() + { + return $this->container['endTime']; + } + + /** + * Sets endTime + * + * @param string|null $endTime 任务结束时间。格式为UTC时间。 + * + * @return $this + */ + public function setEndTime($endTime) + { + $this->container['endTime'] = $endTime; + return $this; + } + + /** + * Gets errorCode + * 错误码。 + * + * @return string|null + */ + public function getErrorCode() + { + return $this->container['errorCode']; + } + + /** + * Sets errorCode + * + * @param string|null $errorCode 错误码。 + * + * @return $this + */ + public function setErrorCode($errorCode) + { + $this->container['errorCode'] = $errorCode; + return $this; + } + + /** + * Gets failReason + * 失败原因。 + * + * @return string|null + */ + public function getFailReason() + { + return $this->container['failReason']; + } + + /** + * Sets failReason + * + * @param string|null $failReason 失败原因。 + * + * @return $this + */ + public function setFailReason($failReason) + { + $this->container['failReason'] = $failReason; + return $this; + } + + /** + * Gets entities + * entities + * + * @return \G42Cloud\SDK\Ims\V2\Model\JobProgressEntities|null + */ + public function getEntities() + { + return $this->container['entities']; + } + + /** + * Sets entities + * + * @param \G42Cloud\SDK\Ims\V2\Model\JobProgressEntities|null $entities entities + * + * @return $this + */ + public function setEntities($entities) + { + $this->container['entities'] = $entities; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowJobRequest.php b/Services/Ims/V2/Model/ShowJobRequest.php new file mode 100755 index 0000000..8caee09 --- /dev/null +++ b/Services/Ims/V2/Model/ShowJobRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * jobId 异步任务ID + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'jobId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * jobId 异步任务ID + * + * @var string[] + */ + protected static $attributeMap = [ + 'jobId' => 'job_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * jobId 异步任务ID + * + * @var string[] + */ + protected static $setters = [ + 'jobId' => 'setJobId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * jobId 异步任务ID + * + * @var string[] + */ + protected static $getters = [ + 'jobId' => 'getJobId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['jobId'] === null) { + $invalidProperties[] = "'jobId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets jobId + * 异步任务ID + * + * @return string + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string $jobId 异步任务ID + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowJobResponse.php b/Services/Ims/V2/Model/ShowJobResponse.php new file mode 100755 index 0000000..5b8c662 --- /dev/null +++ b/Services/Ims/V2/Model/ShowJobResponse.php @@ -0,0 +1,538 @@ + 'string', + 'jobId' => 'string', + 'jobType' => 'string', + 'beginTime' => 'string', + 'endTime' => 'string', + 'errorCode' => 'string', + 'failReason' => 'string', + 'entities' => '\G42Cloud\SDK\Ims\V2\Model\JobEntities' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'status' => null, + 'jobId' => null, + 'jobType' => null, + 'beginTime' => null, + 'endTime' => null, + 'errorCode' => null, + 'failReason' => null, + 'entities' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'jobId' => 'job_id', + 'jobType' => 'job_type', + 'beginTime' => 'begin_time', + 'endTime' => 'end_time', + 'errorCode' => 'error_code', + 'failReason' => 'fail_reason', + 'entities' => 'entities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'jobId' => 'setJobId', + 'jobType' => 'setJobType', + 'beginTime' => 'setBeginTime', + 'endTime' => 'setEndTime', + 'errorCode' => 'setErrorCode', + 'failReason' => 'setFailReason', + 'entities' => 'setEntities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * jobId 任务ID。 + * jobType 任务类型。 + * beginTime 任务开始执行时间。格式为UTC时间。 + * endTime 任务结束时间。格式为UTC时间。 + * errorCode 错误码。 + * failReason 失败原因。 + * entities entities + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'jobId' => 'getJobId', + 'jobType' => 'getJobType', + 'beginTime' => 'getBeginTime', + 'endTime' => 'getEndTime', + 'errorCode' => 'getErrorCode', + 'failReason' => 'getFailReason', + 'entities' => 'getEntities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const STATUS_SUCCESS = 'SUCCESS'; + const STATUS_FAIL = 'FAIL'; + const STATUS_RUNNING = 'RUNNING'; + const STATUS_INIT = 'INIT'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_SUCCESS, + self::STATUS_FAIL, + self::STATUS_RUNNING, + self::STATUS_INIT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['jobId'] = isset($data['jobId']) ? $data['jobId'] : null; + $this->container['jobType'] = isset($data['jobType']) ? $data['jobType'] : null; + $this->container['beginTime'] = isset($data['beginTime']) ? $data['beginTime'] : null; + $this->container['endTime'] = isset($data['endTime']) ? $data['endTime'] : null; + $this->container['errorCode'] = isset($data['errorCode']) ? $data['errorCode'] : null; + $this->container['failReason'] = isset($data['failReason']) ? $data['failReason'] : null; + $this->container['entities'] = isset($data['entities']) ? $data['entities'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表给任务还未执行,正在初始化。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets jobId + * 任务ID。 + * + * @return string|null + */ + public function getJobId() + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId 任务ID。 + * + * @return $this + */ + public function setJobId($jobId) + { + $this->container['jobId'] = $jobId; + return $this; + } + + /** + * Gets jobType + * 任务类型。 + * + * @return string|null + */ + public function getJobType() + { + return $this->container['jobType']; + } + + /** + * Sets jobType + * + * @param string|null $jobType 任务类型。 + * + * @return $this + */ + public function setJobType($jobType) + { + $this->container['jobType'] = $jobType; + return $this; + } + + /** + * Gets beginTime + * 任务开始执行时间。格式为UTC时间。 + * + * @return string|null + */ + public function getBeginTime() + { + return $this->container['beginTime']; + } + + /** + * Sets beginTime + * + * @param string|null $beginTime 任务开始执行时间。格式为UTC时间。 + * + * @return $this + */ + public function setBeginTime($beginTime) + { + $this->container['beginTime'] = $beginTime; + return $this; + } + + /** + * Gets endTime + * 任务结束时间。格式为UTC时间。 + * + * @return string|null + */ + public function getEndTime() + { + return $this->container['endTime']; + } + + /** + * Sets endTime + * + * @param string|null $endTime 任务结束时间。格式为UTC时间。 + * + * @return $this + */ + public function setEndTime($endTime) + { + $this->container['endTime'] = $endTime; + return $this; + } + + /** + * Gets errorCode + * 错误码。 + * + * @return string|null + */ + public function getErrorCode() + { + return $this->container['errorCode']; + } + + /** + * Sets errorCode + * + * @param string|null $errorCode 错误码。 + * + * @return $this + */ + public function setErrorCode($errorCode) + { + $this->container['errorCode'] = $errorCode; + return $this; + } + + /** + * Gets failReason + * 失败原因。 + * + * @return string|null + */ + public function getFailReason() + { + return $this->container['failReason']; + } + + /** + * Sets failReason + * + * @param string|null $failReason 失败原因。 + * + * @return $this + */ + public function setFailReason($failReason) + { + $this->container['failReason'] = $failReason; + return $this; + } + + /** + * Gets entities + * entities + * + * @return \G42Cloud\SDK\Ims\V2\Model\JobEntities|null + */ + public function getEntities() + { + return $this->container['entities']; + } + + /** + * Sets entities + * + * @param \G42Cloud\SDK\Ims\V2\Model\JobEntities|null $entities entities + * + * @return $this + */ + public function setEntities($entities) + { + $this->container['entities'] = $entities; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowVersionRequest.php b/Services/Ims/V2/Model/ShowVersionRequest.php new file mode 100755 index 0000000..11cc0d1 --- /dev/null +++ b/Services/Ims/V2/Model/ShowVersionRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * version API版本号。例如:v2.0 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'version' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * version API版本号。例如:v2.0 + * + * @var string[] + */ + protected static $attributeMap = [ + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * version API版本号。例如:v2.0 + * + * @var string[] + */ + protected static $setters = [ + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * version API版本号。例如:v2.0 + * + * @var string[] + */ + protected static $getters = [ + 'version' => 'getVersion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['version'] = isset($data['version']) ? $data['version'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['version'] === null) { + $invalidProperties[] = "'version' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets version + * API版本号。例如:v2.0 + * + * @return string + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string $version API版本号。例如:v2.0 + * + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/ShowVersionResponse.php b/Services/Ims/V2/Model/ShowVersionResponse.php new file mode 100755 index 0000000..f8a84fa --- /dev/null +++ b/Services/Ims/V2/Model/ShowVersionResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Ims\V2\Model\OsVersionResponse[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * versions 版本信息 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'versions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * versions 版本信息 + * + * @var string[] + */ + protected static $attributeMap = [ + 'versions' => 'versions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * versions 版本信息 + * + * @var string[] + */ + protected static $setters = [ + 'versions' => 'setVersions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * versions 版本信息 + * + * @var string[] + */ + protected static $getters = [ + 'versions' => 'getVersions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['versions'] = isset($data['versions']) ? $data['versions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets versions + * 版本信息 + * + * @return \G42Cloud\SDK\Ims\V2\Model\OsVersionResponse[]|null + */ + public function getVersions() + { + return $this->container['versions']; + } + + /** + * Sets versions + * + * @param \G42Cloud\SDK\Ims\V2\Model\OsVersionResponse[]|null $versions 版本信息 + * + * @return $this + */ + public function setVersions($versions) + { + $this->container['versions'] = $versions; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/TagKeyValue.php b/Services/Ims/V2/Model/TagKeyValue.php new file mode 100755 index 0000000..2fd98b4 --- /dev/null +++ b/Services/Ims/V2/Model/TagKeyValue.php @@ -0,0 +1,306 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 标签的键 + * value 标签的值 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 标签的键 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 标签的键 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets value + * 标签的值 + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 标签的值 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/Tags.php b/Services/Ims/V2/Model/Tags.php new file mode 100755 index 0000000..7882992 --- /dev/null +++ b/Services/Ims/V2/Model/Tags.php @@ -0,0 +1,306 @@ + 'string', + 'values' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 标签的键。最大长度127个unicode字符,key不能为空。 + * values 标签的值列表。每个值最大长度255个unicode字符,如果values为空列表,则标签的值可以是任意值。值列表中的值之间为或的关系。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'values' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 标签的键。最大长度127个unicode字符,key不能为空。 + * values 标签的值列表。每个值最大长度255个unicode字符,如果values为空列表,则标签的值可以是任意值。值列表中的值之间为或的关系。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'values' => 'values' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 标签的键。最大长度127个unicode字符,key不能为空。 + * values 标签的值列表。每个值最大长度255个unicode字符,如果values为空列表,则标签的值可以是任意值。值列表中的值之间为或的关系。 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'values' => 'setValues' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 标签的键。最大长度127个unicode字符,key不能为空。 + * values 标签的值列表。每个值最大长度255个unicode字符,如果values为空列表,则标签的值可以是任意值。值列表中的值之间为或的关系。 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'values' => 'getValues' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['values'] = isset($data['values']) ? $data['values'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['values'] === null) { + $invalidProperties[] = "'values' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 标签的键。最大长度127个unicode字符,key不能为空。 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 标签的键。最大长度127个unicode字符,key不能为空。 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets values + * 标签的值列表。每个值最大长度255个unicode字符,如果values为空列表,则标签的值可以是任意值。值列表中的值之间为或的关系。 + * + * @return string[] + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[] $values 标签的值列表。每个值最大长度255个unicode字符,如果values为空列表,则标签的值可以是任意值。值列表中的值之间为或的关系。 + * + * @return $this + */ + public function setValues($values) + { + $this->container['values'] = $values; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/UpdateImageRequest.php b/Services/Ims/V2/Model/UpdateImageRequest.php new file mode 100755 index 0000000..3efccb4 --- /dev/null +++ b/Services/Ims/V2/Model/UpdateImageRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Ims\V2\Model\UpdateImageRequestBody[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'imageId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageId' => 'image_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $setters = [ + 'imageId' => 'setImageId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * imageId 镜像ID + * body body + * + * @var string[] + */ + protected static $getters = [ + 'imageId' => 'getImageId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageId'] = isset($data['imageId']) ? $data['imageId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['imageId'] === null) { + $invalidProperties[] = "'imageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets imageId + * 镜像ID + * + * @return string + */ + public function getImageId() + { + return $this->container['imageId']; + } + + /** + * Sets imageId + * + * @param string $imageId 镜像ID + * + * @return $this + */ + public function setImageId($imageId) + { + $this->container['imageId'] = $imageId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Ims\V2\Model\UpdateImageRequestBody[]|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Ims\V2\Model\UpdateImageRequestBody[]|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/UpdateImageRequestBody.php b/Services/Ims/V2/Model/UpdateImageRequestBody.php new file mode 100755 index 0000000..48e465d --- /dev/null +++ b/Services/Ims/V2/Model/UpdateImageRequestBody.php @@ -0,0 +1,369 @@ + 'string', + 'path' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * op 操作类型,目前取值为add,replace和remove。 + * path 需要更新的属性名称,需要在属性名称前加“/”。 + * value 需要更新属性的值。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'op' => null, + 'path' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * op 操作类型,目前取值为add,replace和remove。 + * path 需要更新的属性名称,需要在属性名称前加“/”。 + * value 需要更新属性的值。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'op' => 'op', + 'path' => 'path', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * op 操作类型,目前取值为add,replace和remove。 + * path 需要更新的属性名称,需要在属性名称前加“/”。 + * value 需要更新属性的值。 + * + * @var string[] + */ + protected static $setters = [ + 'op' => 'setOp', + 'path' => 'setPath', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * op 操作类型,目前取值为add,replace和remove。 + * path 需要更新的属性名称,需要在属性名称前加“/”。 + * value 需要更新属性的值。 + * + * @var string[] + */ + protected static $getters = [ + 'op' => 'getOp', + 'path' => 'getPath', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const OP_ADD = 'add'; + const OP_REPLACE = 'replace'; + const OP_REMOVE = 'remove'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOpAllowableValues() + { + return [ + self::OP_ADD, + self::OP_REPLACE, + self::OP_REMOVE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['op'] = isset($data['op']) ? $data['op'] : null; + $this->container['path'] = isset($data['path']) ? $data['path'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['op'] === null) { + $invalidProperties[] = "'op' can't be null"; + } + $allowedValues = $this->getOpAllowableValues(); + if (!is_null($this->container['op']) && !in_array($this->container['op'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'op', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['path'] === null) { + $invalidProperties[] = "'path' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets op + * 操作类型,目前取值为add,replace和remove。 + * + * @return string + */ + public function getOp() + { + return $this->container['op']; + } + + /** + * Sets op + * + * @param string $op 操作类型,目前取值为add,replace和remove。 + * + * @return $this + */ + public function setOp($op) + { + $this->container['op'] = $op; + return $this; + } + + /** + * Gets path + * 需要更新的属性名称,需要在属性名称前加“/”。 + * + * @return string + */ + public function getPath() + { + return $this->container['path']; + } + + /** + * Sets path + * + * @param string $path 需要更新的属性名称,需要在属性名称前加“/”。 + * + * @return $this + */ + public function setPath($path) + { + $this->container['path'] = $path; + return $this; + } + + /** + * Gets value + * 需要更新属性的值。 + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 需要更新属性的值。 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Model/UpdateImageResponse.php b/Services/Ims/V2/Model/UpdateImageResponse.php new file mode 100755 index 0000000..49f55e6 --- /dev/null +++ b/Services/Ims/V2/Model/UpdateImageResponse.php @@ -0,0 +1,2622 @@ +,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'backupId' => 'string', + 'dataOrigin' => 'string', + 'description' => 'string', + 'imageSize' => 'string', + 'imageSourceType' => 'string', + 'imagetype' => 'string', + 'isregistered' => 'string', + 'originalimagename' => 'string', + 'osBit' => 'string', + 'osType' => 'string', + 'osVersion' => 'string', + 'platform' => 'string', + 'productcode' => 'string', + 'supportDiskintensive' => 'string', + 'supportHighperformance' => 'string', + 'supportKvm' => 'string', + 'supportKvmGpuType' => 'string', + 'supportKvmInfiniband' => 'string', + 'supportLargememory' => 'string', + 'supportXen' => 'string', + 'supportXenGpuType' => 'string', + 'supportXenHana' => 'string', + 'systemSupportMarket' => 'bool', + 'checksum' => 'string', + 'containerFormat' => 'string', + 'createdAt' => 'string', + 'diskFormat' => 'string', + 'enterpriseProjectId' => 'string', + 'file' => 'string', + 'id' => 'string', + 'minDisk' => 'int', + 'minRam' => 'int', + 'name' => 'string', + 'owner' => 'string', + 'protected' => 'bool', + 'schema' => 'string', + 'self' => 'string', + 'size' => 'int', + 'status' => 'string', + 'tags' => 'string[]', + 'updatedAt' => 'string', + 'virtualEnvType' => 'string', + 'virtualSize' => 'int', + 'visibility' => 'string', + 'supportFcInject' => 'string', + 'hwFirmwareType' => 'string', + 'supportArm' => 'string', + 'maxRam' => 'string', + 'systemCmkid' => 'string', + 'osFeatureList' => 'string', + 'accountCode' => 'string', + 'hwVifMultiqueueEnabled' => 'string', + 'isOffshelved' => 'string', + 'lazyloading' => 'string', + 'rootOrigin' => 'string', + 'sequenceNum' => 'string', + 'activeAt' => 'string', + 'supportAgentList' => 'string', + 'supportAmd' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'backupId' => null, + 'dataOrigin' => null, + 'description' => null, + 'imageSize' => null, + 'imageSourceType' => null, + 'imagetype' => null, + 'isregistered' => null, + 'originalimagename' => null, + 'osBit' => null, + 'osType' => null, + 'osVersion' => null, + 'platform' => null, + 'productcode' => null, + 'supportDiskintensive' => null, + 'supportHighperformance' => null, + 'supportKvm' => null, + 'supportKvmGpuType' => null, + 'supportKvmInfiniband' => null, + 'supportLargememory' => null, + 'supportXen' => null, + 'supportXenGpuType' => null, + 'supportXenHana' => null, + 'systemSupportMarket' => null, + 'checksum' => null, + 'containerFormat' => null, + 'createdAt' => null, + 'diskFormat' => null, + 'enterpriseProjectId' => null, + 'file' => null, + 'id' => null, + 'minDisk' => 'int32', + 'minRam' => 'int32', + 'name' => null, + 'owner' => null, + 'protected' => null, + 'schema' => null, + 'self' => null, + 'size' => 'int32', + 'status' => null, + 'tags' => null, + 'updatedAt' => null, + 'virtualEnvType' => null, + 'virtualSize' => 'int32', + 'visibility' => null, + 'supportFcInject' => null, + 'hwFirmwareType' => null, + 'supportArm' => null, + 'maxRam' => null, + 'systemCmkid' => null, + 'osFeatureList' => null, + 'accountCode' => null, + 'hwVifMultiqueueEnabled' => null, + 'isOffshelved' => null, + 'lazyloading' => null, + 'rootOrigin' => null, + 'sequenceNum' => null, + 'activeAt' => null, + 'supportAgentList' => null, + 'supportAmd' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'backupId' => '__backup_id', + 'dataOrigin' => '__data_origin', + 'description' => '__description', + 'imageSize' => '__image_size', + 'imageSourceType' => '__image_source_type', + 'imagetype' => '__imagetype', + 'isregistered' => '__isregistered', + 'originalimagename' => '__originalimagename', + 'osBit' => '__os_bit', + 'osType' => '__os_type', + 'osVersion' => '__os_version', + 'platform' => '__platform', + 'productcode' => '__productcode', + 'supportDiskintensive' => '__support_diskintensive', + 'supportHighperformance' => '__support_highperformance', + 'supportKvm' => '__support_kvm', + 'supportKvmGpuType' => '__support_kvm_gpu_type', + 'supportKvmInfiniband' => '__support_kvm_infiniband', + 'supportLargememory' => '__support_largememory', + 'supportXen' => '__support_xen', + 'supportXenGpuType' => '__support_xen_gpu_type', + 'supportXenHana' => '__support_xen_hana', + 'systemSupportMarket' => '__system_support_market', + 'checksum' => 'checksum', + 'containerFormat' => 'container_format', + 'createdAt' => 'created_at', + 'diskFormat' => 'disk_format', + 'enterpriseProjectId' => 'enterprise_project_id', + 'file' => 'file', + 'id' => 'id', + 'minDisk' => 'min_disk', + 'minRam' => 'min_ram', + 'name' => 'name', + 'owner' => 'owner', + 'protected' => 'protected', + 'schema' => 'schema', + 'self' => 'self', + 'size' => 'size', + 'status' => 'status', + 'tags' => 'tags', + 'updatedAt' => 'updated_at', + 'virtualEnvType' => 'virtual_env_type', + 'virtualSize' => 'virtual_size', + 'visibility' => 'visibility', + 'supportFcInject' => '__support_fc_inject', + 'hwFirmwareType' => 'hw_firmware_type', + 'supportArm' => '__support_arm', + 'maxRam' => 'max_ram', + 'systemCmkid' => '__system__cmkid', + 'osFeatureList' => '__os_feature_list', + 'accountCode' => '__account_code', + 'hwVifMultiqueueEnabled' => 'hw_vif_multiqueue_enabled', + 'isOffshelved' => '__is_offshelved', + 'lazyloading' => '__lazyloading', + 'rootOrigin' => '__root_origin', + 'sequenceNum' => '__sequence_num', + 'activeAt' => 'active_at', + 'supportAgentList' => '__support_agent_list', + 'supportAmd' => '__support_amd' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $setters = [ + 'backupId' => 'setBackupId', + 'dataOrigin' => 'setDataOrigin', + 'description' => 'setDescription', + 'imageSize' => 'setImageSize', + 'imageSourceType' => 'setImageSourceType', + 'imagetype' => 'setImagetype', + 'isregistered' => 'setIsregistered', + 'originalimagename' => 'setOriginalimagename', + 'osBit' => 'setOsBit', + 'osType' => 'setOsType', + 'osVersion' => 'setOsVersion', + 'platform' => 'setPlatform', + 'productcode' => 'setProductcode', + 'supportDiskintensive' => 'setSupportDiskintensive', + 'supportHighperformance' => 'setSupportHighperformance', + 'supportKvm' => 'setSupportKvm', + 'supportKvmGpuType' => 'setSupportKvmGpuType', + 'supportKvmInfiniband' => 'setSupportKvmInfiniband', + 'supportLargememory' => 'setSupportLargememory', + 'supportXen' => 'setSupportXen', + 'supportXenGpuType' => 'setSupportXenGpuType', + 'supportXenHana' => 'setSupportXenHana', + 'systemSupportMarket' => 'setSystemSupportMarket', + 'checksum' => 'setChecksum', + 'containerFormat' => 'setContainerFormat', + 'createdAt' => 'setCreatedAt', + 'diskFormat' => 'setDiskFormat', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'file' => 'setFile', + 'id' => 'setId', + 'minDisk' => 'setMinDisk', + 'minRam' => 'setMinRam', + 'name' => 'setName', + 'owner' => 'setOwner', + 'protected' => 'setProtected', + 'schema' => 'setSchema', + 'self' => 'setSelf', + 'size' => 'setSize', + 'status' => 'setStatus', + 'tags' => 'setTags', + 'updatedAt' => 'setUpdatedAt', + 'virtualEnvType' => 'setVirtualEnvType', + 'virtualSize' => 'setVirtualSize', + 'visibility' => 'setVisibility', + 'supportFcInject' => 'setSupportFcInject', + 'hwFirmwareType' => 'setHwFirmwareType', + 'supportArm' => 'setSupportArm', + 'maxRam' => 'setMaxRam', + 'systemCmkid' => 'setSystemCmkid', + 'osFeatureList' => 'setOsFeatureList', + 'accountCode' => 'setAccountCode', + 'hwVifMultiqueueEnabled' => 'setHwVifMultiqueueEnabled', + 'isOffshelved' => 'setIsOffshelved', + 'lazyloading' => 'setLazyloading', + 'rootOrigin' => 'setRootOrigin', + 'sequenceNum' => 'setSequenceNum', + 'activeAt' => 'setActiveAt', + 'supportAgentList' => 'setSupportAgentList', + 'supportAmd' => 'setSupportAmd' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * dataOrigin 镜像来源。公共镜像为空 + * description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * imageSize 镜像文件的大小,单位为字节 + * imageSourceType 镜像后端存储类型,目前只支持uds + * imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * isregistered 是否是注册过的镜像,取值为“true”或者“false” + * originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * osBit 操作系统位数,一般取值为“32”或者“64” + * osType 操作系统类型,目前取值Linux, Windows,Other + * osVersion 操作系统具体版本 + * platform 镜像平台分类 + * productcode 市场镜像的产品ID + * supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * checksum 目前暂时不使用 + * containerFormat 容器类型 + * createdAt 创建时间。格式为UTC时间 + * diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * file 镜像文件下载和上传链接 + * id 镜像ID + * minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * owner 镜像属于哪个租户 + * protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * schema 镜像视图 + * self 镜像链接信息 + * size 目前暂时不使用 + * status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * tags 镜像标签列表 + * updatedAt 更新时间。格式为UTC时间 + * virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * virtualSize 目前暂时不使用 + * visibility 是否被其他租户可见,取值为private或public + * supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * systemCmkid 加密镜像所使用的密钥ID。 + * osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * accountCode 收费镜像标识。 + * hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * activeAt 镜像状态变为正常的时间。 + * supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @var string[] + */ + protected static $getters = [ + 'backupId' => 'getBackupId', + 'dataOrigin' => 'getDataOrigin', + 'description' => 'getDescription', + 'imageSize' => 'getImageSize', + 'imageSourceType' => 'getImageSourceType', + 'imagetype' => 'getImagetype', + 'isregistered' => 'getIsregistered', + 'originalimagename' => 'getOriginalimagename', + 'osBit' => 'getOsBit', + 'osType' => 'getOsType', + 'osVersion' => 'getOsVersion', + 'platform' => 'getPlatform', + 'productcode' => 'getProductcode', + 'supportDiskintensive' => 'getSupportDiskintensive', + 'supportHighperformance' => 'getSupportHighperformance', + 'supportKvm' => 'getSupportKvm', + 'supportKvmGpuType' => 'getSupportKvmGpuType', + 'supportKvmInfiniband' => 'getSupportKvmInfiniband', + 'supportLargememory' => 'getSupportLargememory', + 'supportXen' => 'getSupportXen', + 'supportXenGpuType' => 'getSupportXenGpuType', + 'supportXenHana' => 'getSupportXenHana', + 'systemSupportMarket' => 'getSystemSupportMarket', + 'checksum' => 'getChecksum', + 'containerFormat' => 'getContainerFormat', + 'createdAt' => 'getCreatedAt', + 'diskFormat' => 'getDiskFormat', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'file' => 'getFile', + 'id' => 'getId', + 'minDisk' => 'getMinDisk', + 'minRam' => 'getMinRam', + 'name' => 'getName', + 'owner' => 'getOwner', + 'protected' => 'getProtected', + 'schema' => 'getSchema', + 'self' => 'getSelf', + 'size' => 'getSize', + 'status' => 'getStatus', + 'tags' => 'getTags', + 'updatedAt' => 'getUpdatedAt', + 'virtualEnvType' => 'getVirtualEnvType', + 'virtualSize' => 'getVirtualSize', + 'visibility' => 'getVisibility', + 'supportFcInject' => 'getSupportFcInject', + 'hwFirmwareType' => 'getHwFirmwareType', + 'supportArm' => 'getSupportArm', + 'maxRam' => 'getMaxRam', + 'systemCmkid' => 'getSystemCmkid', + 'osFeatureList' => 'getOsFeatureList', + 'accountCode' => 'getAccountCode', + 'hwVifMultiqueueEnabled' => 'getHwVifMultiqueueEnabled', + 'isOffshelved' => 'getIsOffshelved', + 'lazyloading' => 'getLazyloading', + 'rootOrigin' => 'getRootOrigin', + 'sequenceNum' => 'getSequenceNum', + 'activeAt' => 'getActiveAt', + 'supportAgentList' => 'getSupportAgentList', + 'supportAmd' => 'getSupportAmd' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + const IMAGE_SOURCE_TYPE_UDS = 'uds'; + const IMAGE_SOURCE_TYPE_SWIFT = 'swift'; + const IMAGETYPE_GOLD = 'gold'; + const IMAGETYPE__PRIVATE = 'private'; + const IMAGETYPE_SHARED = 'shared'; + const ISREGISTERED_TRUE = 'true'; + const ISREGISTERED_FALSE = 'false'; + const OS_BIT__32 = '32'; + const OS_BIT__64 = '64'; + const OS_TYPE_LINUX = 'Linux'; + const OS_TYPE_WINDOWS = 'Windows'; + const OS_TYPE_OTHER = 'Other'; + const PLATFORM_WINDOWS = 'Windows'; + const PLATFORM_UBUNTU = 'Ubuntu'; + const PLATFORM_RED_HAT = 'RedHat'; + const PLATFORM_SUSE = 'SUSE'; + const PLATFORM_CENT_OS = 'CentOS'; + const PLATFORM_DEBIAN = 'Debian'; + const PLATFORM_OPEN_SUSE = 'OpenSUSE'; + const PLATFORM_ORACLE_LINUX = 'Oracle Linux'; + const PLATFORM_FEDORA = 'Fedora'; + const PLATFORM_OTHER = 'Other'; + const PLATFORM_CORE_OS = 'CoreOS'; + const PLATFORM_EULER_OS = 'EulerOS'; + const STATUS_QUEUED = 'queued'; + const STATUS_SAVING = 'saving'; + const STATUS_DELETED = 'deleted'; + const STATUS_KILLED = 'killed'; + const STATUS_ACTIVE = 'active'; + const VIRTUAL_ENV_TYPE_FUSION_COMPUTE = 'FusionCompute'; + const VIRTUAL_ENV_TYPE_IRONIC = 'Ironic'; + const VIRTUAL_ENV_TYPE_DATA_IMAGE = 'DataImage'; + const VISIBILITY__PRIVATE = 'private'; + const VISIBILITY__PUBLIC = 'public'; + const SUPPORT_FC_INJECT_TRUE = 'true'; + const SUPPORT_FC_INJECT_FALSE = 'false'; + const HW_FIRMWARE_TYPE_BIOS = 'bios'; + const HW_FIRMWARE_TYPE_UEFI = 'uefi'; + const SUPPORT_ARM_TRUE = 'true'; + const SUPPORT_ARM_FALSE = 'false'; + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImageSourceTypeAllowableValues() + { + return [ + self::IMAGE_SOURCE_TYPE_UDS, + self::IMAGE_SOURCE_TYPE_SWIFT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImagetypeAllowableValues() + { + return [ + self::IMAGETYPE_GOLD, + self::IMAGETYPE__PRIVATE, + self::IMAGETYPE_SHARED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsregisteredAllowableValues() + { + return [ + self::ISREGISTERED_TRUE, + self::ISREGISTERED_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsBitAllowableValues() + { + return [ + self::OS_BIT__32, + self::OS_BIT__64, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOsTypeAllowableValues() + { + return [ + self::OS_TYPE_LINUX, + self::OS_TYPE_WINDOWS, + self::OS_TYPE_OTHER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_WINDOWS, + self::PLATFORM_UBUNTU, + self::PLATFORM_RED_HAT, + self::PLATFORM_SUSE, + self::PLATFORM_CENT_OS, + self::PLATFORM_DEBIAN, + self::PLATFORM_OPEN_SUSE, + self::PLATFORM_ORACLE_LINUX, + self::PLATFORM_FEDORA, + self::PLATFORM_OTHER, + self::PLATFORM_CORE_OS, + self::PLATFORM_EULER_OS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_SAVING, + self::STATUS_DELETED, + self::STATUS_KILLED, + self::STATUS_ACTIVE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVirtualEnvTypeAllowableValues() + { + return [ + self::VIRTUAL_ENV_TYPE_FUSION_COMPUTE, + self::VIRTUAL_ENV_TYPE_IRONIC, + self::VIRTUAL_ENV_TYPE_DATA_IMAGE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVisibilityAllowableValues() + { + return [ + self::VISIBILITY__PRIVATE, + self::VISIBILITY__PUBLIC, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportFcInjectAllowableValues() + { + return [ + self::SUPPORT_FC_INJECT_TRUE, + self::SUPPORT_FC_INJECT_FALSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHwFirmwareTypeAllowableValues() + { + return [ + self::HW_FIRMWARE_TYPE_BIOS, + self::HW_FIRMWARE_TYPE_UEFI, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSupportArmAllowableValues() + { + return [ + self::SUPPORT_ARM_TRUE, + self::SUPPORT_ARM_FALSE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['backupId'] = isset($data['backupId']) ? $data['backupId'] : null; + $this->container['dataOrigin'] = isset($data['dataOrigin']) ? $data['dataOrigin'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['imageSize'] = isset($data['imageSize']) ? $data['imageSize'] : null; + $this->container['imageSourceType'] = isset($data['imageSourceType']) ? $data['imageSourceType'] : null; + $this->container['imagetype'] = isset($data['imagetype']) ? $data['imagetype'] : null; + $this->container['isregistered'] = isset($data['isregistered']) ? $data['isregistered'] : null; + $this->container['originalimagename'] = isset($data['originalimagename']) ? $data['originalimagename'] : null; + $this->container['osBit'] = isset($data['osBit']) ? $data['osBit'] : null; + $this->container['osType'] = isset($data['osType']) ? $data['osType'] : null; + $this->container['osVersion'] = isset($data['osVersion']) ? $data['osVersion'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['productcode'] = isset($data['productcode']) ? $data['productcode'] : null; + $this->container['supportDiskintensive'] = isset($data['supportDiskintensive']) ? $data['supportDiskintensive'] : null; + $this->container['supportHighperformance'] = isset($data['supportHighperformance']) ? $data['supportHighperformance'] : null; + $this->container['supportKvm'] = isset($data['supportKvm']) ? $data['supportKvm'] : null; + $this->container['supportKvmGpuType'] = isset($data['supportKvmGpuType']) ? $data['supportKvmGpuType'] : null; + $this->container['supportKvmInfiniband'] = isset($data['supportKvmInfiniband']) ? $data['supportKvmInfiniband'] : null; + $this->container['supportLargememory'] = isset($data['supportLargememory']) ? $data['supportLargememory'] : null; + $this->container['supportXen'] = isset($data['supportXen']) ? $data['supportXen'] : null; + $this->container['supportXenGpuType'] = isset($data['supportXenGpuType']) ? $data['supportXenGpuType'] : null; + $this->container['supportXenHana'] = isset($data['supportXenHana']) ? $data['supportXenHana'] : null; + $this->container['systemSupportMarket'] = isset($data['systemSupportMarket']) ? $data['systemSupportMarket'] : null; + $this->container['checksum'] = isset($data['checksum']) ? $data['checksum'] : null; + $this->container['containerFormat'] = isset($data['containerFormat']) ? $data['containerFormat'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['diskFormat'] = isset($data['diskFormat']) ? $data['diskFormat'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['file'] = isset($data['file']) ? $data['file'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['minDisk'] = isset($data['minDisk']) ? $data['minDisk'] : null; + $this->container['minRam'] = isset($data['minRam']) ? $data['minRam'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['protected'] = isset($data['protected']) ? $data['protected'] : null; + $this->container['schema'] = isset($data['schema']) ? $data['schema'] : null; + $this->container['self'] = isset($data['self']) ? $data['self'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['virtualEnvType'] = isset($data['virtualEnvType']) ? $data['virtualEnvType'] : null; + $this->container['virtualSize'] = isset($data['virtualSize']) ? $data['virtualSize'] : null; + $this->container['visibility'] = isset($data['visibility']) ? $data['visibility'] : null; + $this->container['supportFcInject'] = isset($data['supportFcInject']) ? $data['supportFcInject'] : null; + $this->container['hwFirmwareType'] = isset($data['hwFirmwareType']) ? $data['hwFirmwareType'] : null; + $this->container['supportArm'] = isset($data['supportArm']) ? $data['supportArm'] : null; + $this->container['maxRam'] = isset($data['maxRam']) ? $data['maxRam'] : null; + $this->container['systemCmkid'] = isset($data['systemCmkid']) ? $data['systemCmkid'] : null; + $this->container['osFeatureList'] = isset($data['osFeatureList']) ? $data['osFeatureList'] : null; + $this->container['accountCode'] = isset($data['accountCode']) ? $data['accountCode'] : null; + $this->container['hwVifMultiqueueEnabled'] = isset($data['hwVifMultiqueueEnabled']) ? $data['hwVifMultiqueueEnabled'] : null; + $this->container['isOffshelved'] = isset($data['isOffshelved']) ? $data['isOffshelved'] : null; + $this->container['lazyloading'] = isset($data['lazyloading']) ? $data['lazyloading'] : null; + $this->container['rootOrigin'] = isset($data['rootOrigin']) ? $data['rootOrigin'] : null; + $this->container['sequenceNum'] = isset($data['sequenceNum']) ? $data['sequenceNum'] : null; + $this->container['activeAt'] = isset($data['activeAt']) ? $data['activeAt'] : null; + $this->container['supportAgentList'] = isset($data['supportAgentList']) ? $data['supportAgentList'] : null; + $this->container['supportAmd'] = isset($data['supportAmd']) ? $data['supportAmd'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1024)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1024."; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 0."; + } + $allowedValues = $this->getImageSourceTypeAllowableValues(); + if (!is_null($this->container['imageSourceType']) && !in_array($this->container['imageSourceType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imageSourceType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getImagetypeAllowableValues(); + if (!is_null($this->container['imagetype']) && !in_array($this->container['imagetype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'imagetype', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsregisteredAllowableValues(); + if (!is_null($this->container['isregistered']) && !in_array($this->container['isregistered'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'isregistered', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsBitAllowableValues(); + if (!is_null($this->container['osBit']) && !in_array($this->container['osBit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osBit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOsTypeAllowableValues(); + if (!is_null($this->container['osType']) && !in_array($this->container['osType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'osType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'platform', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] > 1024)) { + $invalidProperties[] = "invalid value for 'minDisk', must be smaller than or equal to 1024."; + } + if (!is_null($this->container['minDisk']) && ($this->container['minDisk'] < 40)) { + $invalidProperties[] = "invalid value for 'minDisk', must be bigger than or equal to 40."; + } + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 128)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 128."; + } + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVirtualEnvTypeAllowableValues(); + if (!is_null($this->container['virtualEnvType']) && !in_array($this->container['virtualEnvType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'virtualEnvType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVisibilityAllowableValues(); + if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'visibility', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportFcInjectAllowableValues(); + if (!is_null($this->container['supportFcInject']) && !in_array($this->container['supportFcInject'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportFcInject', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getHwFirmwareTypeAllowableValues(); + if (!is_null($this->container['hwFirmwareType']) && !in_array($this->container['hwFirmwareType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'hwFirmwareType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSupportArmAllowableValues(); + if (!is_null($this->container['supportArm']) && !in_array($this->container['supportArm'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'supportArm', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets backupId + * 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * + * @return string|null + */ + public function getBackupId() + { + return $this->container['backupId']; + } + + /** + * Sets backupId + * + * @param string|null $backupId 备份ID。如果是备份创建的镜像,则填写为备份的ID,否则为空 + * + * @return $this + */ + public function setBackupId($backupId) + { + $this->container['backupId'] = $backupId; + return $this; + } + + /** + * Gets dataOrigin + * 镜像来源。公共镜像为空 + * + * @return string|null + */ + public function getDataOrigin() + { + return $this->container['dataOrigin']; + } + + /** + * Sets dataOrigin + * + * @param string|null $dataOrigin 镜像来源。公共镜像为空 + * + * @return $this + */ + public function setDataOrigin($dataOrigin) + { + $this->container['dataOrigin'] = $dataOrigin; + return $this; + } + + /** + * Gets description + * 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 镜像描述信息。 支持字母、数字、中文等,不支持回车、<、 >,长度不能超过1024个字符。 + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + return $this; + } + + /** + * Gets imageSize + * 镜像文件的大小,单位为字节 + * + * @return string|null + */ + public function getImageSize() + { + return $this->container['imageSize']; + } + + /** + * Sets imageSize + * + * @param string|null $imageSize 镜像文件的大小,单位为字节 + * + * @return $this + */ + public function setImageSize($imageSize) + { + $this->container['imageSize'] = $imageSize; + return $this; + } + + /** + * Gets imageSourceType + * 镜像后端存储类型,目前只支持uds + * + * @return string|null + */ + public function getImageSourceType() + { + return $this->container['imageSourceType']; + } + + /** + * Sets imageSourceType + * + * @param string|null $imageSourceType 镜像后端存储类型,目前只支持uds + * + * @return $this + */ + public function setImageSourceType($imageSourceType) + { + $this->container['imageSourceType'] = $imageSourceType; + return $this; + } + + /** + * Gets imagetype + * 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * + * @return string|null + */ + public function getImagetype() + { + return $this->container['imagetype']; + } + + /** + * Sets imagetype + * + * @param string|null $imagetype 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private 共享镜像:shared 市场镜像:market + * + * @return $this + */ + public function setImagetype($imagetype) + { + $this->container['imagetype'] = $imagetype; + return $this; + } + + /** + * Gets isregistered + * 是否是注册过的镜像,取值为“true”或者“false” + * + * @return string|null + */ + public function getIsregistered() + { + return $this->container['isregistered']; + } + + /** + * Sets isregistered + * + * @param string|null $isregistered 是否是注册过的镜像,取值为“true”或者“false” + * + * @return $this + */ + public function setIsregistered($isregistered) + { + $this->container['isregistered'] = $isregistered; + return $this; + } + + /** + * Gets originalimagename + * 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * + * @return string|null + */ + public function getOriginalimagename() + { + return $this->container['originalimagename']; + } + + /** + * Sets originalimagename + * + * @param string|null $originalimagename 父镜像ID。公共镜像或通过文件创建的私有镜像,取值为空 + * + * @return $this + */ + public function setOriginalimagename($originalimagename) + { + $this->container['originalimagename'] = $originalimagename; + return $this; + } + + /** + * Gets osBit + * 操作系统位数,一般取值为“32”或者“64” + * + * @return string|null + */ + public function getOsBit() + { + return $this->container['osBit']; + } + + /** + * Sets osBit + * + * @param string|null $osBit 操作系统位数,一般取值为“32”或者“64” + * + * @return $this + */ + public function setOsBit($osBit) + { + $this->container['osBit'] = $osBit; + return $this; + } + + /** + * Gets osType + * 操作系统类型,目前取值Linux, Windows,Other + * + * @return string|null + */ + public function getOsType() + { + return $this->container['osType']; + } + + /** + * Sets osType + * + * @param string|null $osType 操作系统类型,目前取值Linux, Windows,Other + * + * @return $this + */ + public function setOsType($osType) + { + $this->container['osType'] = $osType; + return $this; + } + + /** + * Gets osVersion + * 操作系统具体版本 + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion 操作系统具体版本 + * + * @return $this + */ + public function setOsVersion($osVersion) + { + $this->container['osVersion'] = $osVersion; + return $this; + } + + /** + * Gets platform + * 镜像平台分类 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 镜像平台分类 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets productcode + * 市场镜像的产品ID + * + * @return string|null + */ + public function getProductcode() + { + return $this->container['productcode']; + } + + /** + * Sets productcode + * + * @param string|null $productcode 市场镜像的产品ID + * + * @return $this + */ + public function setProductcode($productcode) + { + $this->container['productcode'] = $productcode; + return $this; + } + + /** + * Gets supportDiskintensive + * 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportDiskintensive() + { + return $this->container['supportDiskintensive']; + } + + /** + * Sets supportDiskintensive + * + * @param string|null $supportDiskintensive 镜像来源表示该镜像支持密集存储。如果镜像支持密集存储性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportDiskintensive($supportDiskintensive) + { + $this->container['supportDiskintensive'] = $supportDiskintensive; + return $this; + } + + /** + * Gets supportHighperformance + * 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportHighperformance() + { + return $this->container['supportHighperformance']; + } + + /** + * Sets supportHighperformance + * + * @param string|null $supportHighperformance 表示该镜像支持高计算性能。如果镜像支持高计算性能,则值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportHighperformance($supportHighperformance) + { + $this->container['supportHighperformance'] = $supportHighperformance; + return $this; + } + + /** + * Gets supportKvm + * 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportKvm() + { + return $this->container['supportKvm']; + } + + /** + * Sets supportKvm + * + * @param string|null $supportKvm 如果镜像支持KVM,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportKvm($supportKvm) + { + $this->container['supportKvm'] = $supportKvm; + return $this; + } + + /** + * Gets supportKvmGpuType + * 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmGpuType() + { + return $this->container['supportKvmGpuType']; + } + + /** + * Sets supportKvmGpuType + * + * @param string|null $supportKvmGpuType 表示该镜像是支持KVM虚拟化平台下的GPU类型,如果不支持KVM虚拟机下GPU类型,无需添加该属性。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportKvmGpuType($supportKvmGpuType) + { + $this->container['supportKvmGpuType'] = $supportKvmGpuType; + return $this; + } + + /** + * Gets supportKvmInfiniband + * 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return string|null + */ + public function getSupportKvmInfiniband() + { + return $this->container['supportKvmInfiniband']; + } + + /** + * Sets supportKvmInfiniband + * + * @param string|null $supportKvmInfiniband 如果镜像支持KVM虚拟化下Infiniband网卡类型,取值为true。否则,无需添加该属性。该属性与“__support_xen”属性不共存。 + * + * @return $this + */ + public function setSupportKvmInfiniband($supportKvmInfiniband) + { + $this->container['supportKvmInfiniband'] = $supportKvmInfiniband; + return $this; + } + + /** + * Gets supportLargememory + * 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportLargememory() + { + return $this->container['supportLargememory']; + } + + /** + * Sets supportLargememory + * + * @param string|null $supportLargememory 表示该镜像支持超大内存。如果镜像支持超大内存,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportLargememory($supportLargememory) + { + $this->container['supportLargememory'] = $supportLargememory; + return $this; + } + + /** + * Gets supportXen + * 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return string|null + */ + public function getSupportXen() + { + return $this->container['supportXen']; + } + + /** + * Sets supportXen + * + * @param string|null $supportXen 如果镜像支持XEN,取值为true,否则无需增加该属性。 + * + * @return $this + */ + public function setSupportXen($supportXen) + { + $this->container['supportXen'] = $supportXen; + return $this; + } + + /** + * Gets supportXenGpuType + * 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenGpuType() + { + return $this->container['supportXenGpuType']; + } + + /** + * Sets supportXenGpuType + * + * @param string|null $supportXenGpuType 表示该镜像是支持XEN虚拟化平台下的GPU优化类型,如果不支持XEN虚拟化下GPU类型,无需添加该属性 。该属性与“__support_xen”和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenGpuType($supportXenGpuType) + { + $this->container['supportXenGpuType'] = $supportXenGpuType; + return $this; + } + + /** + * Gets supportXenHana + * 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * + * @return string|null + */ + public function getSupportXenHana() + { + return $this->container['supportXenHana']; + } + + /** + * Sets supportXenHana + * + * @param string|null $supportXenHana 如果镜像支持XEN虚拟化下HANA类型,取值为true。否则,无需添加该属性。该属性与“__support_xen” 和“__support_kvm”属性不共存。 + * + * @return $this + */ + public function setSupportXenHana($supportXenHana) + { + $this->container['supportXenHana'] = $supportXenHana; + return $this; + } + + /** + * Gets systemSupportMarket + * 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * + * @return bool|null + */ + public function getSystemSupportMarket() + { + return $this->container['systemSupportMarket']; + } + + /** + * Sets systemSupportMarket + * + * @param bool|null $systemSupportMarket 表示当前镜像是否支持发布为市场镜像,true表示支持,false 表示不支持 + * + * @return $this + */ + public function setSystemSupportMarket($systemSupportMarket) + { + $this->container['systemSupportMarket'] = $systemSupportMarket; + return $this; + } + + /** + * Gets checksum + * 目前暂时不使用 + * + * @return string|null + */ + public function getChecksum() + { + return $this->container['checksum']; + } + + /** + * Sets checksum + * + * @param string|null $checksum 目前暂时不使用 + * + * @return $this + */ + public function setChecksum($checksum) + { + $this->container['checksum'] = $checksum; + return $this; + } + + /** + * Gets containerFormat + * 容器类型 + * + * @return string|null + */ + public function getContainerFormat() + { + return $this->container['containerFormat']; + } + + /** + * Sets containerFormat + * + * @param string|null $containerFormat 容器类型 + * + * @return $this + */ + public function setContainerFormat($containerFormat) + { + $this->container['containerFormat'] = $containerFormat; + return $this; + } + + /** + * Gets createdAt + * 创建时间。格式为UTC时间 + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string|null $createdAt 创建时间。格式为UTC时间 + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + return $this; + } + + /** + * Gets diskFormat + * 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * + * @return string|null + */ + public function getDiskFormat() + { + return $this->container['diskFormat']; + } + + /** + * Sets diskFormat + * + * @param string|null $diskFormat 镜像的格式,目前支持vhd,zvhd、raw,qcow2。默认值是vhd + * + * @return $this + */ + public function setDiskFormat($diskFormat) + { + $this->container['diskFormat'] = $diskFormat; + return $this; + } + + /** + * Gets enterpriseProjectId + * 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 表示当前镜像所属的企业项目。取值为0或无该值,表示属于default企业项目,取值为UUID,表示属于该UUID对应的企业项目。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets file + * 镜像文件下载和上传链接 + * + * @return string|null + */ + public function getFile() + { + return $this->container['file']; + } + + /** + * Sets file + * + * @param string|null $file 镜像文件下载和上传链接 + * + * @return $this + */ + public function setFile($file) + { + $this->container['file'] = $file; + return $this; + } + + /** + * Gets id + * 镜像ID + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id 镜像ID + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets minDisk + * 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * + * @return int|null + */ + public function getMinDisk() + { + return $this->container['minDisk']; + } + + /** + * Sets minDisk + * + * @param int|null $minDisk 镜像运行需要的最小磁盘容量,单位为GB。取值为40~1024GB。 + * + * @return $this + */ + public function setMinDisk($minDisk) + { + $this->container['minDisk'] = $minDisk; + return $this; + } + + /** + * Gets minRam + * 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * + * @return int|null + */ + public function getMinRam() + { + return $this->container['minRam']; + } + + /** + * Sets minRam + * + * @param int|null $minRam 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,默认设置为0 + * + * @return $this + */ + public function setMinRam($minRam) + { + $this->container['minRam'] = $minRam; + return $this; + } + + /** + * Gets name + * 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 镜像名称。 名称的首尾字母不能为空格。 名称的长度至为1~128位。 名称包含以下4种字符: 大写字母 小写字母 数字 特殊字符包含-、.、_、空格和中文。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets owner + * 镜像属于哪个租户 + * + * @return string|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner 镜像属于哪个租户 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets protected + * 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * + * @return bool|null + */ + public function getProtected() + { + return $this->container['protected']; + } + + /** + * Sets protected + * + * @param bool|null $protected 是否是受保护的,受保护的镜像不允许删除。取值为true或false + * + * @return $this + */ + public function setProtected($protected) + { + $this->container['protected'] = $protected; + return $this; + } + + /** + * Gets schema + * 镜像视图 + * + * @return string|null + */ + public function getSchema() + { + return $this->container['schema']; + } + + /** + * Sets schema + * + * @param string|null $schema 镜像视图 + * + * @return $this + */ + public function setSchema($schema) + { + $this->container['schema'] = $schema; + return $this; + } + + /** + * Gets self + * 镜像链接信息 + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self 镜像链接信息 + * + * @return $this + */ + public function setSelf($self) + { + $this->container['self'] = $self; + return $this; + } + + /** + * Gets size + * 目前暂时不使用 + * + * @return int|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size 目前暂时不使用 + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + return $this; + } + + /** + * Gets status + * 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status 镜像状态。取值如下:queued:表示镜像元数据已经创建成功,等待 上传镜像文件。saving:表示镜像 正在上传文件到后端存储。deleted:表示镜像已经删除。killed:表示镜像上传错误。active:表示镜像可以正常使用 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets tags + * 镜像标签列表 + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags 镜像标签列表 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets updatedAt + * 更新时间。格式为UTC时间 + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string|null $updatedAt 更新时间。格式为UTC时间 + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + return $this; + } + + /** + * Gets virtualEnvType + * 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * + * @return string|null + */ + public function getVirtualEnvType() + { + return $this->container['virtualEnvType']; + } + + /** + * Sets virtualEnvType + * + * @param string|null $virtualEnvType 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取Dat aImage,如果是裸金属服务器镜像,则取值是Ironic + * + * @return $this + */ + public function setVirtualEnvType($virtualEnvType) + { + $this->container['virtualEnvType'] = $virtualEnvType; + return $this; + } + + /** + * Gets virtualSize + * 目前暂时不使用 + * + * @return int|null + */ + public function getVirtualSize() + { + return $this->container['virtualSize']; + } + + /** + * Sets virtualSize + * + * @param int|null $virtualSize 目前暂时不使用 + * + * @return $this + */ + public function setVirtualSize($virtualSize) + { + $this->container['virtualSize'] = $virtualSize; + return $this; + } + + /** + * Gets visibility + * 是否被其他租户可见,取值为private或public + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility + * + * @param string|null $visibility 是否被其他租户可见,取值为private或public + * + * @return $this + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + return $this; + } + + /** + * Gets supportFcInject + * 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return string|null + */ + public function getSupportFcInject() + { + return $this->container['supportFcInject']; + } + + /** + * Sets supportFcInject + * + * @param string|null $supportFcInject 表示当前镜像支持CloudInit密码/密钥注入方式,建议设置为\"true\"或者\"false\"。 如果取值为\"true\",表示该镜像不支持CloudInit注入密码/密钥,其他取值时表示支持CloudInit注入密钥/密码。 + * + * @return $this + */ + public function setSupportFcInject($supportFcInject) + { + $this->container['supportFcInject'] = $supportFcInject; + return $this; + } + + /** + * Gets hwFirmwareType + * 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return string|null + */ + public function getHwFirmwareType() + { + return $this->container['hwFirmwareType']; + } + + /** + * Sets hwFirmwareType + * + * @param string|null $hwFirmwareType 云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + * + * @return $this + */ + public function setHwFirmwareType($hwFirmwareType) + { + $this->container['hwFirmwareType'] = $hwFirmwareType; + return $this; + } + + /** + * Gets supportArm + * 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportArm() + { + return $this->container['supportArm']; + } + + /** + * Sets supportArm + * + * @param string|null $supportArm 是否是ARM架构类型的镜像,取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportArm($supportArm) + { + $this->container['supportArm'] = $supportArm; + return $this; + } + + /** + * Gets maxRam + * 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return string|null + */ + public function getMaxRam() + { + return $this->container['maxRam']; + } + + /** + * Sets maxRam + * + * @param string|null $maxRam 镜像支持的最大内存,单位为MB。取值可以参考云服务器规格限制,一般不设置。 + * + * @return $this + */ + public function setMaxRam($maxRam) + { + $this->container['maxRam'] = $maxRam; + return $this; + } + + /** + * Gets systemCmkid + * 加密镜像所使用的密钥ID。 + * + * @return string|null + */ + public function getSystemCmkid() + { + return $this->container['systemCmkid']; + } + + /** + * Sets systemCmkid + * + * @param string|null $systemCmkid 加密镜像所使用的密钥ID。 + * + * @return $this + */ + public function setSystemCmkid($systemCmkid) + { + $this->container['systemCmkid'] = $systemCmkid; + return $this; + } + + /** + * Gets osFeatureList + * 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return string|null + */ + public function getOsFeatureList() + { + return $this->container['osFeatureList']; + } + + /** + * Sets osFeatureList + * + * @param string|null $osFeatureList 镜像附加属性。该属性采用JSON格式来标识镜像支持的高级特性清单。 + * + * @return $this + */ + public function setOsFeatureList($osFeatureList) + { + $this->container['osFeatureList'] = $osFeatureList; + return $this; + } + + /** + * Gets accountCode + * 收费镜像标识。 + * + * @return string|null + */ + public function getAccountCode() + { + return $this->container['accountCode']; + } + + /** + * Sets accountCode + * + * @param string|null $accountCode 收费镜像标识。 + * + * @return $this + */ + public function setAccountCode($accountCode) + { + $this->container['accountCode'] = $accountCode; + return $this; + } + + /** + * Gets hwVifMultiqueueEnabled + * 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * + * @return string|null + */ + public function getHwVifMultiqueueEnabled() + { + return $this->container['hwVifMultiqueueEnabled']; + } + + /** + * Sets hwVifMultiqueueEnabled + * + * @param string|null $hwVifMultiqueueEnabled 镜像是否支持网卡多队列。取值为“true”或者“false”。 + * + * @return $this + */ + public function setHwVifMultiqueueEnabled($hwVifMultiqueueEnabled) + { + $this->container['hwVifMultiqueueEnabled'] = $hwVifMultiqueueEnabled; + return $this; + } + + /** + * Gets isOffshelved + * 表示当前市场镜像是否下架。true:已下架 false:未下架 + * + * @return string|null + */ + public function getIsOffshelved() + { + return $this->container['isOffshelved']; + } + + /** + * Sets isOffshelved + * + * @param string|null $isOffshelved 表示当前市场镜像是否下架。true:已下架 false:未下架 + * + * @return $this + */ + public function setIsOffshelved($isOffshelved) + { + $this->container['isOffshelved'] = $isOffshelved; + return $this; + } + + /** + * Gets lazyloading + * 镜像是否支持延迟加载。取值为“True”或“False”。 + * + * @return string|null + */ + public function getLazyloading() + { + return $this->container['lazyloading']; + } + + /** + * Sets lazyloading + * + * @param string|null $lazyloading 镜像是否支持延迟加载。取值为“True”或“False”。 + * + * @return $this + */ + public function setLazyloading($lazyloading) + { + $this->container['lazyloading'] = $lazyloading; + return $this; + } + + /** + * Gets rootOrigin + * 表示当前镜像来源是从外部导入。取值:file。 + * + * @return string|null + */ + public function getRootOrigin() + { + return $this->container['rootOrigin']; + } + + /** + * Sets rootOrigin + * + * @param string|null $rootOrigin 表示当前镜像来源是从外部导入。取值:file。 + * + * @return $this + */ + public function setRootOrigin($rootOrigin) + { + $this->container['rootOrigin'] = $rootOrigin; + return $this; + } + + /** + * Gets sequenceNum + * 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * + * @return string|null + */ + public function getSequenceNum() + { + return $this->container['sequenceNum']; + } + + /** + * Sets sequenceNum + * + * @param string|null $sequenceNum 表示当前镜像对应云服务器的系统盘插槽位置。目前暂时不用 + * + * @return $this + */ + public function setSequenceNum($sequenceNum) + { + $this->container['sequenceNum'] = $sequenceNum; + return $this; + } + + /** + * Gets activeAt + * 镜像状态变为正常的时间。 + * + * @return string|null + */ + public function getActiveAt() + { + return $this->container['activeAt']; + } + + /** + * Sets activeAt + * + * @param string|null $activeAt 镜像状态变为正常的时间。 + * + * @return $this + */ + public function setActiveAt($activeAt) + { + $this->container['activeAt'] = $activeAt; + return $this; + } + + /** + * Gets supportAgentList + * 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return string|null + */ + public function getSupportAgentList() + { + return $this->container['supportAgentList']; + } + + /** + * Sets supportAgentList + * + * @param string|null $supportAgentList 镜像是否支持企业主机安全或主机监控。 hss:企业主机安全 ces:主机监控 + * + * @return $this + */ + public function setSupportAgentList($supportAgentList) + { + $this->container['supportAgentList'] = $supportAgentList; + return $this; + } + + /** + * Gets supportAmd + * 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return string|null + */ + public function getSupportAmd() + { + return $this->container['supportAmd']; + } + + /** + * Sets supportAmd + * + * @param string|null $supportAmd 是否是AMD架构类型的镜像。取值为“true”或者“false”。 + * + * @return $this + */ + public function setSupportAmd($supportAmd) + { + $this->container['supportAmd'] = $supportAmd; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Ims/V2/Region/ImsRegion.php b/Services/Ims/V2/Region/ImsRegion.php new file mode 100755 index 0000000..006f914 --- /dev/null +++ b/Services/Ims/V2/Region/ImsRegion.php @@ -0,0 +1,27 @@ +"ae-ad-1",); + + public static function valueOf($regionId) + { + try { + if (null == $regionId) { + throw new InvalidArgumentException("Unexpected empty parameter: regionId."); + } + $endpoint = array_search($regionId, self::$REGION); + if (!$endpoint) { + throw new InvalidArgumentException("Unexpected regionId: " . $regionId); + } + return new Region($regionId, $endpoint); + } catch (InvalidArgumentException $e) { + $msg = $e->getMessage(); + echo "\n" . $msg . "\n"; + } + } +} \ No newline at end of file diff --git a/Services/Ims/composer.json b/Services/Ims/composer.json new file mode 100755 index 0000000..1fa4af1 --- /dev/null +++ b/Services/Ims/composer.json @@ -0,0 +1,30 @@ +{ + "name": "g42cloud/g42cloud-sdk-ims", + "description": "G42CLOUD SDK IMS", + "keywords": [ + "php", + "sdk", + "rest", + "api", + "ims" + ], + "version": "0.0.2-beta", + "type": "library", + "license": "Apache-2.0", + "authors": [ + { + "name": "G42Cloud_SDK", + "email": "unionsdk@outlook.com", + "homepage": "https://github.com/g42cloud-sdk/g42cloud-sdk-php" + } + ], + "minimum-stability": "dev", + "require": { + "g42cloud/cloud-sdk-core": "0.0.2-beta" + }, + "autoload": { + "psr-4": { + "G42Cloud\\SDK\\Ims\\V3\\": "V3/" + } + } +} diff --git a/Services/Smn/V2/Model/AddSubscriptionRequest.php b/Services/Smn/V2/Model/AddSubscriptionRequest.php new file mode 100755 index 0000000..072ac84 --- /dev/null +++ b/Services/Smn/V2/Model/AddSubscriptionRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\AddSubscriptionRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\AddSubscriptionRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\AddSubscriptionRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/AddSubscriptionRequestBody.php b/Services/Smn/V2/Model/AddSubscriptionRequestBody.php new file mode 100755 index 0000000..3f59ea0 --- /dev/null +++ b/Services/Smn/V2/Model/AddSubscriptionRequestBody.php @@ -0,0 +1,341 @@ + 'string', + 'endpoint' => 'string', + 'remark' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 + * endpoint 说明: https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 dms协议,接入点必须是一个消息队列。 application协议,接入点必须是一个应用平台的设备终端。 callnotify协议,接入点必须是一个电话号码。 + * remark 备注。最大支持128字节,约42个中文,必须是UTF-8编码的字符串,否则无法正常显示中文。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'protocol' => null, + 'endpoint' => null, + 'remark' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 + * endpoint 说明: https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 dms协议,接入点必须是一个消息队列。 application协议,接入点必须是一个应用平台的设备终端。 callnotify协议,接入点必须是一个电话号码。 + * remark 备注。最大支持128字节,约42个中文,必须是UTF-8编码的字符串,否则无法正常显示中文。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'protocol' => 'protocol', + 'endpoint' => 'endpoint', + 'remark' => 'remark' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 + * endpoint 说明: https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 dms协议,接入点必须是一个消息队列。 application协议,接入点必须是一个应用平台的设备终端。 callnotify协议,接入点必须是一个电话号码。 + * remark 备注。最大支持128字节,约42个中文,必须是UTF-8编码的字符串,否则无法正常显示中文。 + * + * @var string[] + */ + protected static $setters = [ + 'protocol' => 'setProtocol', + 'endpoint' => 'setEndpoint', + 'remark' => 'setRemark' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 + * endpoint 说明: https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 dms协议,接入点必须是一个消息队列。 application协议,接入点必须是一个应用平台的设备终端。 callnotify协议,接入点必须是一个电话号码。 + * remark 备注。最大支持128字节,约42个中文,必须是UTF-8编码的字符串,否则无法正常显示中文。 + * + * @var string[] + */ + protected static $getters = [ + 'protocol' => 'getProtocol', + 'endpoint' => 'getEndpoint', + 'remark' => 'getRemark' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['protocol'] = isset($data['protocol']) ? $data['protocol'] : null; + $this->container['endpoint'] = isset($data['endpoint']) ? $data['endpoint'] : null; + $this->container['remark'] = isset($data['remark']) ? $data['remark'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['protocol'] === null) { + $invalidProperties[] = "'protocol' can't be null"; + } + if ($this->container['endpoint'] === null) { + $invalidProperties[] = "'endpoint' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets protocol + * 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 + * + * @return string + */ + public function getProtocol() + { + return $this->container['protocol']; + } + + /** + * Sets protocol + * + * @param string $protocol 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 + * + * @return $this + */ + public function setProtocol($protocol) + { + $this->container['protocol'] = $protocol; + return $this; + } + + /** + * Gets endpoint + * 说明: https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 dms协议,接入点必须是一个消息队列。 application协议,接入点必须是一个应用平台的设备终端。 callnotify协议,接入点必须是一个电话号码。 + * + * @return string + */ + public function getEndpoint() + { + return $this->container['endpoint']; + } + + /** + * Sets endpoint + * + * @param string $endpoint 说明: https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 dms协议,接入点必须是一个消息队列。 application协议,接入点必须是一个应用平台的设备终端。 callnotify协议,接入点必须是一个电话号码。 + * + * @return $this + */ + public function setEndpoint($endpoint) + { + $this->container['endpoint'] = $endpoint; + return $this; + } + + /** + * Gets remark + * 备注。最大支持128字节,约42个中文,必须是UTF-8编码的字符串,否则无法正常显示中文。 + * + * @return string|null + */ + public function getRemark() + { + return $this->container['remark']; + } + + /** + * Sets remark + * + * @param string|null $remark 备注。最大支持128字节,约42个中文,必须是UTF-8编码的字符串,否则无法正常显示中文。 + * + * @return $this + */ + public function setRemark($remark) + { + $this->container['remark'] = $remark; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/AddSubscriptionResponse.php b/Services/Smn/V2/Model/AddSubscriptionResponse.php new file mode 100755 index 0000000..b23eb58 --- /dev/null +++ b/Services/Smn/V2/Model/AddSubscriptionResponse.php @@ -0,0 +1,301 @@ + 'string', + 'subscriptionUrn' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * subscriptionUrn 订阅者的唯一资源标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'subscriptionUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * subscriptionUrn 订阅者的唯一资源标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'subscriptionUrn' => 'subscription_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * subscriptionUrn 订阅者的唯一资源标识。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'subscriptionUrn' => 'setSubscriptionUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * subscriptionUrn 订阅者的唯一资源标识。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'subscriptionUrn' => 'getSubscriptionUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['subscriptionUrn'] = isset($data['subscriptionUrn']) ? $data['subscriptionUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets subscriptionUrn + * 订阅者的唯一资源标识。 + * + * @return string|null + */ + public function getSubscriptionUrn() + { + return $this->container['subscriptionUrn']; + } + + /** + * Sets subscriptionUrn + * + * @param string|null $subscriptionUrn 订阅者的唯一资源标识。 + * + * @return $this + */ + public function setSubscriptionUrn($subscriptionUrn) + { + $this->container['subscriptionUrn'] = $subscriptionUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ApplicationEndpoint.php b/Services/Smn/V2/Model/ApplicationEndpoint.php new file mode 100755 index 0000000..1542e58 --- /dev/null +++ b/Services/Smn/V2/Model/ApplicationEndpoint.php @@ -0,0 +1,420 @@ + 'string', + 'endpointUrn' => 'string', + 'userData' => 'string', + 'enabled' => 'string', + 'token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * createTime 创建application的时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * endpointUrn Application endpoint的唯一资源标识。 + * userData 用户自定义数据 最大长度支持UTF-8编码后2048字节。 + * enabled endpoint启用开关 true或false字符串。 + * token 设备token 最大长度512个字节。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'createTime' => null, + 'endpointUrn' => null, + 'userData' => null, + 'enabled' => null, + 'token' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * createTime 创建application的时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * endpointUrn Application endpoint的唯一资源标识。 + * userData 用户自定义数据 最大长度支持UTF-8编码后2048字节。 + * enabled endpoint启用开关 true或false字符串。 + * token 设备token 最大长度512个字节。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'createTime' => 'create_time', + 'endpointUrn' => 'endpoint_urn', + 'userData' => 'user_data', + 'enabled' => 'enabled', + 'token' => 'token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * createTime 创建application的时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * endpointUrn Application endpoint的唯一资源标识。 + * userData 用户自定义数据 最大长度支持UTF-8编码后2048字节。 + * enabled endpoint启用开关 true或false字符串。 + * token 设备token 最大长度512个字节。 + * + * @var string[] + */ + protected static $setters = [ + 'createTime' => 'setCreateTime', + 'endpointUrn' => 'setEndpointUrn', + 'userData' => 'setUserData', + 'enabled' => 'setEnabled', + 'token' => 'setToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * createTime 创建application的时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * endpointUrn Application endpoint的唯一资源标识。 + * userData 用户自定义数据 最大长度支持UTF-8编码后2048字节。 + * enabled endpoint启用开关 true或false字符串。 + * token 设备token 最大长度512个字节。 + * + * @var string[] + */ + protected static $getters = [ + 'createTime' => 'getCreateTime', + 'endpointUrn' => 'getEndpointUrn', + 'userData' => 'getUserData', + 'enabled' => 'getEnabled', + 'token' => 'getToken' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null; + $this->container['endpointUrn'] = isset($data['endpointUrn']) ? $data['endpointUrn'] : null; + $this->container['userData'] = isset($data['userData']) ? $data['userData'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['createTime'] === null) { + $invalidProperties[] = "'createTime' can't be null"; + } + if ($this->container['endpointUrn'] === null) { + $invalidProperties[] = "'endpointUrn' can't be null"; + } + if ($this->container['userData'] === null) { + $invalidProperties[] = "'userData' can't be null"; + } + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets createTime + * 创建application的时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string + */ + public function getCreateTime() + { + return $this->container['createTime']; + } + + /** + * Sets createTime + * + * @param string $createTime 创建application的时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setCreateTime($createTime) + { + $this->container['createTime'] = $createTime; + return $this; + } + + /** + * Gets endpointUrn + * Application endpoint的唯一资源标识。 + * + * @return string + */ + public function getEndpointUrn() + { + return $this->container['endpointUrn']; + } + + /** + * Sets endpointUrn + * + * @param string $endpointUrn Application endpoint的唯一资源标识。 + * + * @return $this + */ + public function setEndpointUrn($endpointUrn) + { + $this->container['endpointUrn'] = $endpointUrn; + return $this; + } + + /** + * Gets userData + * 用户自定义数据 最大长度支持UTF-8编码后2048字节。 + * + * @return string + */ + public function getUserData() + { + return $this->container['userData']; + } + + /** + * Sets userData + * + * @param string $userData 用户自定义数据 最大长度支持UTF-8编码后2048字节。 + * + * @return $this + */ + public function setUserData($userData) + { + $this->container['userData'] = $userData; + return $this; + } + + /** + * Gets enabled + * endpoint启用开关 true或false字符串。 + * + * @return string + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param string $enabled endpoint启用开关 true或false字符串。 + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + return $this; + } + + /** + * Gets token + * 设备token 最大长度512个字节。 + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token 设备token 最大长度512个字节。 + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ApplicationItem.php b/Services/Smn/V2/Model/ApplicationItem.php new file mode 100755 index 0000000..a9a7cab --- /dev/null +++ b/Services/Smn/V2/Model/ApplicationItem.php @@ -0,0 +1,493 @@ + 'string', + 'platform' => 'string', + 'createTime' => 'string', + 'applicationUrn' => 'string', + 'applicationId' => 'string', + 'enabled' => 'string', + 'appleCertificateExpirationDate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * name 创建application的名字。 + * platform 应用平台。 + * createTime 创建application的时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application的唯一标识ID。 + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间APNS、APNS_SANDBOX平台特有属性时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'platform' => null, + 'createTime' => null, + 'applicationUrn' => null, + 'applicationId' => null, + 'enabled' => null, + 'appleCertificateExpirationDate' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * name 创建application的名字。 + * platform 应用平台。 + * createTime 创建application的时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application的唯一标识ID。 + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间APNS、APNS_SANDBOX平台特有属性时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'platform' => 'platform', + 'createTime' => 'create_time', + 'applicationUrn' => 'application_urn', + 'applicationId' => 'application_id', + 'enabled' => 'enabled', + 'appleCertificateExpirationDate' => 'apple_certificate_expiration_date' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * name 创建application的名字。 + * platform 应用平台。 + * createTime 创建application的时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application的唯一标识ID。 + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间APNS、APNS_SANDBOX平台特有属性时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'platform' => 'setPlatform', + 'createTime' => 'setCreateTime', + 'applicationUrn' => 'setApplicationUrn', + 'applicationId' => 'setApplicationId', + 'enabled' => 'setEnabled', + 'appleCertificateExpirationDate' => 'setAppleCertificateExpirationDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * name 创建application的名字。 + * platform 应用平台。 + * createTime 创建application的时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application的唯一标识ID。 + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间APNS、APNS_SANDBOX平台特有属性时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'platform' => 'getPlatform', + 'createTime' => 'getCreateTime', + 'applicationUrn' => 'getApplicationUrn', + 'applicationId' => 'getApplicationId', + 'enabled' => 'getEnabled', + 'appleCertificateExpirationDate' => 'getAppleCertificateExpirationDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null; + $this->container['applicationUrn'] = isset($data['applicationUrn']) ? $data['applicationUrn'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['appleCertificateExpirationDate'] = isset($data['appleCertificateExpirationDate']) ? $data['appleCertificateExpirationDate'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['platform'] === null) { + $invalidProperties[] = "'platform' can't be null"; + } + if ($this->container['createTime'] === null) { + $invalidProperties[] = "'createTime' can't be null"; + } + if ($this->container['applicationUrn'] === null) { + $invalidProperties[] = "'applicationUrn' can't be null"; + } + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * 创建application的名字。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 创建application的名字。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets platform + * 应用平台。 + * + * @return string + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string $platform 应用平台。 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets createTime + * 创建application的时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string + */ + public function getCreateTime() + { + return $this->container['createTime']; + } + + /** + * Sets createTime + * + * @param string $createTime 创建application的时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setCreateTime($createTime) + { + $this->container['createTime'] = $createTime; + return $this; + } + + /** + * Gets applicationUrn + * Application的唯一资源标识。 + * + * @return string + */ + public function getApplicationUrn() + { + return $this->container['applicationUrn']; + } + + /** + * Sets applicationUrn + * + * @param string $applicationUrn Application的唯一资源标识。 + * + * @return $this + */ + public function setApplicationUrn($applicationUrn) + { + $this->container['applicationUrn'] = $applicationUrn; + return $this; + } + + /** + * Gets applicationId + * Application的唯一标识ID。 + * + * @return string + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param string $applicationId Application的唯一标识ID。 + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + return $this; + } + + /** + * Gets enabled + * 应用平台是否启用。 + * + * @return string + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param string $enabled 应用平台是否启用。 + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + return $this; + } + + /** + * Gets appleCertificateExpirationDate + * 苹果证书过期时间APNS、APNS_SANDBOX平台特有属性时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string|null + */ + public function getAppleCertificateExpirationDate() + { + return $this->container['appleCertificateExpirationDate']; + } + + /** + * Sets appleCertificateExpirationDate + * + * @param string|null $appleCertificateExpirationDate 苹果证书过期时间APNS、APNS_SANDBOX平台特有属性时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setAppleCertificateExpirationDate($appleCertificateExpirationDate) + { + $this->container['appleCertificateExpirationDate'] = $appleCertificateExpirationDate; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequest.php b/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequest.php new file mode 100755 index 0000000..7e905b1 --- /dev/null +++ b/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequest.php @@ -0,0 +1,341 @@ + 'string', + 'resourceId' => 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\BatchCreateOrDeleteResourceTagsRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceType' => null, + 'resourceId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceType' => 'resource_type', + 'resourceId' => 'resource_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'resourceType' => 'setResourceType', + 'resourceId' => 'setResourceId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'resourceType' => 'getResourceType', + 'resourceId' => 'getResourceId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceType'] = isset($data['resourceType']) ? $data['resourceType'] : null; + $this->container['resourceId'] = isset($data['resourceId']) ? $data['resourceId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceType'] === null) { + $invalidProperties[] = "'resourceType' can't be null"; + } + if ($this->container['resourceId'] === null) { + $invalidProperties[] = "'resourceId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceType + * 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return string + */ + public function getResourceType() + { + return $this->container['resourceType']; + } + + /** + * Sets resourceType + * + * @param string $resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return $this + */ + public function setResourceType($resourceType) + { + $this->container['resourceType'] = $resourceType; + return $this; + } + + /** + * Gets resourceId + * 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return string + */ + public function getResourceId() + { + return $this->container['resourceId']; + } + + /** + * Sets resourceId + * + * @param string $resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return $this + */ + public function setResourceId($resourceId) + { + $this->container['resourceId'] = $resourceId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\BatchCreateOrDeleteResourceTagsRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\BatchCreateOrDeleteResourceTagsRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequestBody.php b/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequestBody.php new file mode 100755 index 0000000..ea6e987 --- /dev/null +++ b/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsRequestBody.php @@ -0,0 +1,306 @@ + '\G42Cloud\SDK\Smn\V2\Model\ResourceTag[]', + 'action' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tags 标签列表,结构体说明请参见表1。删除时tags结构体不能缺失,key不能为空或空字符串,且不针对字符集范围进行校验。 + * action 操作标识:仅限于create(创建)、delete(删除)。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tags' => null, + 'action' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tags 标签列表,结构体说明请参见表1。删除时tags结构体不能缺失,key不能为空或空字符串,且不针对字符集范围进行校验。 + * action 操作标识:仅限于create(创建)、delete(删除)。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tags' => 'tags', + 'action' => 'action' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tags 标签列表,结构体说明请参见表1。删除时tags结构体不能缺失,key不能为空或空字符串,且不针对字符集范围进行校验。 + * action 操作标识:仅限于create(创建)、delete(删除)。 + * + * @var string[] + */ + protected static $setters = [ + 'tags' => 'setTags', + 'action' => 'setAction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tags 标签列表,结构体说明请参见表1。删除时tags结构体不能缺失,key不能为空或空字符串,且不针对字符集范围进行校验。 + * action 操作标识:仅限于create(创建)、delete(删除)。 + * + * @var string[] + */ + protected static $getters = [ + 'tags' => 'getTags', + 'action' => 'getAction' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['action'] === null) { + $invalidProperties[] = "'action' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tags + * 标签列表,结构体说明请参见表1。删除时tags结构体不能缺失,key不能为空或空字符串,且不针对字符集范围进行校验。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTag[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTag[] $tags 标签列表,结构体说明请参见表1。删除时tags结构体不能缺失,key不能为空或空字符串,且不针对字符集范围进行校验。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets action + * 操作标识:仅限于create(创建)、delete(删除)。 + * + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string $action 操作标识:仅限于create(创建)、delete(删除)。 + * + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsResponse.php b/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsResponse.php new file mode 100755 index 0000000..8ffba10 --- /dev/null +++ b/Services/Smn/V2/Model/BatchCreateOrDeleteResourceTagsResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CancelSubscriptionRequest.php b/Services/Smn/V2/Model/CancelSubscriptionRequest.php new file mode 100755 index 0000000..8ebaeb7 --- /dev/null +++ b/Services/Smn/V2/Model/CancelSubscriptionRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](https://support.huaweicloud.com/api-smn/ListSubscriptions.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'subscriptionUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](https://support.huaweicloud.com/api-smn/ListSubscriptions.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'subscriptionUrn' => 'subscription_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](https://support.huaweicloud.com/api-smn/ListSubscriptions.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'subscriptionUrn' => 'setSubscriptionUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](https://support.huaweicloud.com/api-smn/ListSubscriptions.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'subscriptionUrn' => 'getSubscriptionUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['subscriptionUrn'] = isset($data['subscriptionUrn']) ? $data['subscriptionUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['subscriptionUrn'] === null) { + $invalidProperties[] = "'subscriptionUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets subscriptionUrn + * 订阅者的唯一的资源标识,可通过[查询订阅者列表](https://support.huaweicloud.com/api-smn/ListSubscriptions.html)获取该标识。 + * + * @return string + */ + public function getSubscriptionUrn() + { + return $this->container['subscriptionUrn']; + } + + /** + * Sets subscriptionUrn + * + * @param string $subscriptionUrn 订阅者的唯一的资源标识,可通过[查询订阅者列表](https://support.huaweicloud.com/api-smn/ListSubscriptions.html)获取该标识。 + * + * @return $this + */ + public function setSubscriptionUrn($subscriptionUrn) + { + $this->container['subscriptionUrn'] = $subscriptionUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CancelSubscriptionResponse.php b/Services/Smn/V2/Model/CancelSubscriptionResponse.php new file mode 100755 index 0000000..bb835eb --- /dev/null +++ b/Services/Smn/V2/Model/CancelSubscriptionResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateApplicationEndpointRequest.php b/Services/Smn/V2/Model/CreateApplicationEndpointRequest.php new file mode 100755 index 0000000..b32d11a --- /dev/null +++ b/Services/Smn/V2/Model/CreateApplicationEndpointRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\CreateApplicationEndpointRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationUrn' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationUrn' => 'application_urn', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'applicationUrn' => 'setApplicationUrn', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'applicationUrn' => 'getApplicationUrn', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationUrn'] = isset($data['applicationUrn']) ? $data['applicationUrn'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['applicationUrn'] === null) { + $invalidProperties[] = "'applicationUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets applicationUrn + * Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return string + */ + public function getApplicationUrn() + { + return $this->container['applicationUrn']; + } + + /** + * Sets applicationUrn + * + * @param string $applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return $this + */ + public function setApplicationUrn($applicationUrn) + { + $this->container['applicationUrn'] = $applicationUrn; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\CreateApplicationEndpointRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\CreateApplicationEndpointRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateApplicationEndpointRequestBody.php b/Services/Smn/V2/Model/CreateApplicationEndpointRequestBody.php new file mode 100755 index 0000000..13d69a1 --- /dev/null +++ b/Services/Smn/V2/Model/CreateApplicationEndpointRequestBody.php @@ -0,0 +1,306 @@ + 'string', + 'userData' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * token 移动应用设备token,最大长度512个字节。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'token' => null, + 'userData' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * token 移动应用设备token,最大长度512个字节。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'token' => 'token', + 'userData' => 'user_data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * token 移动应用设备token,最大长度512个字节。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $setters = [ + 'token' => 'setToken', + 'userData' => 'setUserData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * token 移动应用设备token,最大长度512个字节。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $getters = [ + 'token' => 'getToken', + 'userData' => 'getUserData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['userData'] = isset($data['userData']) ? $data['userData'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' can't be null"; + } + if ($this->container['userData'] === null) { + $invalidProperties[] = "'userData' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets token + * 移动应用设备token,最大长度512个字节。 + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token 移动应用设备token,最大长度512个字节。 + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + return $this; + } + + /** + * Gets userData + * 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @return string + */ + public function getUserData() + { + return $this->container['userData']; + } + + /** + * Sets userData + * + * @param string $userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @return $this + */ + public function setUserData($userData) + { + $this->container['userData'] = $userData; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateApplicationEndpointResponse.php b/Services/Smn/V2/Model/CreateApplicationEndpointResponse.php new file mode 100755 index 0000000..97bba93 --- /dev/null +++ b/Services/Smn/V2/Model/CreateApplicationEndpointResponse.php @@ -0,0 +1,301 @@ + 'string', + 'endpointUrn' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * endpointUrn Endpoint的唯一资源标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'endpointUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * endpointUrn Endpoint的唯一资源标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'endpointUrn' => 'endpoint_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * endpointUrn Endpoint的唯一资源标识。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'endpointUrn' => 'setEndpointUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * endpointUrn Endpoint的唯一资源标识。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'endpointUrn' => 'getEndpointUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['endpointUrn'] = isset($data['endpointUrn']) ? $data['endpointUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets endpointUrn + * Endpoint的唯一资源标识。 + * + * @return string|null + */ + public function getEndpointUrn() + { + return $this->container['endpointUrn']; + } + + /** + * Sets endpointUrn + * + * @param string|null $endpointUrn Endpoint的唯一资源标识。 + * + * @return $this + */ + public function setEndpointUrn($endpointUrn) + { + $this->container['endpointUrn'] = $endpointUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateApplicationRequest.php b/Services/Smn/V2/Model/CreateApplicationRequest.php new file mode 100755 index 0000000..91400cf --- /dev/null +++ b/Services/Smn/V2/Model/CreateApplicationRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Smn\V2\Model\CreateApplicationRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\CreateApplicationRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\CreateApplicationRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateApplicationRequestBody.php b/Services/Smn/V2/Model/CreateApplicationRequestBody.php new file mode 100755 index 0000000..ddcd554 --- /dev/null +++ b/Services/Smn/V2/Model/CreateApplicationRequestBody.php @@ -0,0 +1,382 @@ + 'string', + 'platform' => 'string', + 'platformPrincipal' => 'string', + 'platformCredential' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * name 应用名。 最大支持64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'platform' => null, + 'platformPrincipal' => null, + 'platformCredential' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * name 应用名。 最大支持64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'platform' => 'platform', + 'platformPrincipal' => 'platform_principal', + 'platformCredential' => 'platform_credential' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * name 应用名。 最大支持64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'platform' => 'setPlatform', + 'platformPrincipal' => 'setPlatformPrincipal', + 'platformCredential' => 'setPlatformCredential' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * name 应用名。 最大支持64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'platform' => 'getPlatform', + 'platformPrincipal' => 'getPlatformPrincipal', + 'platformCredential' => 'getPlatformCredential' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + $this->container['platformPrincipal'] = isset($data['platformPrincipal']) ? $data['platformPrincipal'] : null; + $this->container['platformCredential'] = isset($data['platformCredential']) ? $data['platformCredential'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['platform'] === null) { + $invalidProperties[] = "'platform' can't be null"; + } + if ($this->container['platformPrincipal'] === null) { + $invalidProperties[] = "'platformPrincipal' can't be null"; + } + if ($this->container['platformCredential'] === null) { + $invalidProperties[] = "'platformCredential' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * 应用名。 最大支持64个字符,只能包含英文字母、下划线和数字。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 应用名。 最大支持64个字符,只能包含英文字母、下划线和数字。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets platform + * 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @return string + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string $platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Gets platformPrincipal + * 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * + * @return string + */ + public function getPlatformPrincipal() + { + return $this->container['platformPrincipal']; + } + + /** + * Sets platformPrincipal + * + * @param string $platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * + * @return $this + */ + public function setPlatformPrincipal($platformPrincipal) + { + $this->container['platformPrincipal'] = $platformPrincipal; + return $this; + } + + /** + * Gets platformCredential + * 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @return string + */ + public function getPlatformCredential() + { + return $this->container['platformCredential']; + } + + /** + * Sets platformCredential + * + * @param string $platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @return $this + */ + public function setPlatformCredential($platformCredential) + { + $this->container['platformCredential'] = $platformCredential; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateApplicationResponse.php b/Services/Smn/V2/Model/CreateApplicationResponse.php new file mode 100755 index 0000000..f4e267e --- /dev/null +++ b/Services/Smn/V2/Model/CreateApplicationResponse.php @@ -0,0 +1,336 @@ + 'string', + 'applicationUrn' => 'string', + 'applicationId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application资源的ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'applicationUrn' => null, + 'applicationId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application资源的ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'applicationUrn' => 'application_urn', + 'applicationId' => 'application_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application资源的ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'applicationUrn' => 'setApplicationUrn', + 'applicationId' => 'setApplicationId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * applicationUrn Application的唯一资源标识。 + * applicationId Application资源的ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'applicationUrn' => 'getApplicationUrn', + 'applicationId' => 'getApplicationId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['applicationUrn'] = isset($data['applicationUrn']) ? $data['applicationUrn'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets applicationUrn + * Application的唯一资源标识。 + * + * @return string|null + */ + public function getApplicationUrn() + { + return $this->container['applicationUrn']; + } + + /** + * Sets applicationUrn + * + * @param string|null $applicationUrn Application的唯一资源标识。 + * + * @return $this + */ + public function setApplicationUrn($applicationUrn) + { + $this->container['applicationUrn'] = $applicationUrn; + return $this; + } + + /** + * Gets applicationId + * Application资源的ID。 + * + * @return string|null + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param string|null $applicationId Application资源的ID。 + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateMessageTemplateRequest.php b/Services/Smn/V2/Model/CreateMessageTemplateRequest.php new file mode 100755 index 0000000..8d5ef48 --- /dev/null +++ b/Services/Smn/V2/Model/CreateMessageTemplateRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Smn\V2\Model\CreateMessageTemplateRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\CreateMessageTemplateRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\CreateMessageTemplateRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateMessageTemplateRequestBody.php b/Services/Smn/V2/Model/CreateMessageTemplateRequestBody.php new file mode 100755 index 0000000..1998dfb --- /dev/null +++ b/Services/Smn/V2/Model/CreateMessageTemplateRequestBody.php @@ -0,0 +1,344 @@ + 'string', + 'protocol' => 'string', + 'content' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * messageTemplateName 创建模板的名称。只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * content 模板内容,模板目前仅支持纯文本模式。模板内容不能空,最大支持256KB。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'messageTemplateName' => null, + 'protocol' => null, + 'content' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * messageTemplateName 创建模板的名称。只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * content 模板内容,模板目前仅支持纯文本模式。模板内容不能空,最大支持256KB。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageTemplateName' => 'message_template_name', + 'protocol' => 'protocol', + 'content' => 'content' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * messageTemplateName 创建模板的名称。只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * content 模板内容,模板目前仅支持纯文本模式。模板内容不能空,最大支持256KB。 + * + * @var string[] + */ + protected static $setters = [ + 'messageTemplateName' => 'setMessageTemplateName', + 'protocol' => 'setProtocol', + 'content' => 'setContent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * messageTemplateName 创建模板的名称。只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * content 模板内容,模板目前仅支持纯文本模式。模板内容不能空,最大支持256KB。 + * + * @var string[] + */ + protected static $getters = [ + 'messageTemplateName' => 'getMessageTemplateName', + 'protocol' => 'getProtocol', + 'content' => 'getContent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageTemplateName'] = isset($data['messageTemplateName']) ? $data['messageTemplateName'] : null; + $this->container['protocol'] = isset($data['protocol']) ? $data['protocol'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['messageTemplateName'] === null) { + $invalidProperties[] = "'messageTemplateName' can't be null"; + } + if ($this->container['protocol'] === null) { + $invalidProperties[] = "'protocol' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets messageTemplateName + * 创建模板的名称。只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * + * @return string + */ + public function getMessageTemplateName() + { + return $this->container['messageTemplateName']; + } + + /** + * Sets messageTemplateName + * + * @param string $messageTemplateName 创建模板的名称。只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * + * @return $this + */ + public function setMessageTemplateName($messageTemplateName) + { + $this->container['messageTemplateName'] = $messageTemplateName; + return $this; + } + + /** + * Gets protocol + * 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return string + */ + public function getProtocol() + { + return $this->container['protocol']; + } + + /** + * Sets protocol + * + * @param string $protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return $this + */ + public function setProtocol($protocol) + { + $this->container['protocol'] = $protocol; + return $this; + } + + /** + * Gets content + * 模板内容,模板目前仅支持纯文本模式。模板内容不能空,最大支持256KB。 + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content 模板内容,模板目前仅支持纯文本模式。模板内容不能空,最大支持256KB。 + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateMessageTemplateResponse.php b/Services/Smn/V2/Model/CreateMessageTemplateResponse.php new file mode 100755 index 0000000..695f025 --- /dev/null +++ b/Services/Smn/V2/Model/CreateMessageTemplateResponse.php @@ -0,0 +1,301 @@ + 'string', + 'messageTemplateId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * messageTemplateId 模板唯一的资源标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'messageTemplateId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * messageTemplateId 模板唯一的资源标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'messageTemplateId' => 'message_template_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * messageTemplateId 模板唯一的资源标识。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'messageTemplateId' => 'setMessageTemplateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * messageTemplateId 模板唯一的资源标识。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'messageTemplateId' => 'getMessageTemplateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['messageTemplateId'] = isset($data['messageTemplateId']) ? $data['messageTemplateId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets messageTemplateId + * 模板唯一的资源标识。 + * + * @return string|null + */ + public function getMessageTemplateId() + { + return $this->container['messageTemplateId']; + } + + /** + * Sets messageTemplateId + * + * @param string|null $messageTemplateId 模板唯一的资源标识。 + * + * @return $this + */ + public function setMessageTemplateId($messageTemplateId) + { + $this->container['messageTemplateId'] = $messageTemplateId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateResourceTagRequest.php b/Services/Smn/V2/Model/CreateResourceTagRequest.php new file mode 100755 index 0000000..ec57d58 --- /dev/null +++ b/Services/Smn/V2/Model/CreateResourceTagRequest.php @@ -0,0 +1,341 @@ + 'string', + 'resourceId' => 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceType' => null, + 'resourceId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceType' => 'resource_type', + 'resourceId' => 'resource_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'resourceType' => 'setResourceType', + 'resourceId' => 'setResourceId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'resourceType' => 'getResourceType', + 'resourceId' => 'getResourceId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceType'] = isset($data['resourceType']) ? $data['resourceType'] : null; + $this->container['resourceId'] = isset($data['resourceId']) ? $data['resourceId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceType'] === null) { + $invalidProperties[] = "'resourceType' can't be null"; + } + if ($this->container['resourceId'] === null) { + $invalidProperties[] = "'resourceId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceType + * 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return string + */ + public function getResourceType() + { + return $this->container['resourceType']; + } + + /** + * Sets resourceType + * + * @param string $resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return $this + */ + public function setResourceType($resourceType) + { + $this->container['resourceType'] = $resourceType; + return $this; + } + + /** + * Gets resourceId + * 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return string + */ + public function getResourceId() + { + return $this->container['resourceId']; + } + + /** + * Sets resourceId + * + * @param string $resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return $this + */ + public function setResourceId($resourceId) + { + $this->container['resourceId'] = $resourceId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateResourceTagRequestBody.php b/Services/Smn/V2/Model/CreateResourceTagRequestBody.php new file mode 100755 index 0000000..44776f0 --- /dev/null +++ b/Services/Smn/V2/Model/CreateResourceTagRequestBody.php @@ -0,0 +1,268 @@ + '\G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequestBodyTag' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tag tag + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tag tag + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tag tag + * + * @var string[] + */ + protected static $setters = [ + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tag tag + * + * @var string[] + */ + protected static $getters = [ + 'tag' => 'getTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['tag'] === null) { + $invalidProperties[] = "'tag' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tag + * tag + * + * @return \G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequestBodyTag + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param \G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequestBodyTag $tag tag + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateResourceTagRequestBodyTag.php b/Services/Smn/V2/Model/CreateResourceTagRequestBodyTag.php new file mode 100755 index 0000000..ca05d36 --- /dev/null +++ b/Services/Smn/V2/Model/CreateResourceTagRequestBodyTag.php @@ -0,0 +1,306 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets value + * 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateResourceTagResponse.php b/Services/Smn/V2/Model/CreateResourceTagResponse.php new file mode 100755 index 0000000..f747d7d --- /dev/null +++ b/Services/Smn/V2/Model/CreateResourceTagResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateTopicRequest.php b/Services/Smn/V2/Model/CreateTopicRequest.php new file mode 100755 index 0000000..dfab45e --- /dev/null +++ b/Services/Smn/V2/Model/CreateTopicRequest.php @@ -0,0 +1,265 @@ + '\G42Cloud\SDK\Smn\V2\Model\CreateTopicRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * body body + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * body body + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\CreateTopicRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\CreateTopicRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateTopicRequestBody.php b/Services/Smn/V2/Model/CreateTopicRequestBody.php new file mode 100755 index 0000000..d092b9c --- /dev/null +++ b/Services/Smn/V2/Model/CreateTopicRequestBody.php @@ -0,0 +1,353 @@ + 'string', + 'displayName' => 'string', + 'enterpriseProjectId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * name 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 + * enterpriseProjectId 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'displayName' => null, + 'enterpriseProjectId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * name 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 + * enterpriseProjectId 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'displayName' => 'display_name', + 'enterpriseProjectId' => 'enterprise_project_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * name 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 + * enterpriseProjectId 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'displayName' => 'setDisplayName', + 'enterpriseProjectId' => 'setEnterpriseProjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * name 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 + * enterpriseProjectId 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'displayName' => 'getDisplayName', + 'enterpriseProjectId' => 'getEnterpriseProjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['displayName'] = isset($data['displayName']) ? $data['displayName'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : '0'; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 255)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 255."; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + if ($this->container['displayName'] === null) { + $invalidProperties[] = "'displayName' can't be null"; + } + if ((mb_strlen($this->container['displayName']) > 192)) { + $invalidProperties[] = "invalid value for 'displayName', the character length must be smaller than or equal to 192."; + } + if ((mb_strlen($this->container['displayName']) < 1)) { + $invalidProperties[] = "invalid value for 'displayName', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets displayName + * Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 + * + * @return string + */ + public function getDisplayName() + { + return $this->container['displayName']; + } + + /** + * Sets displayName + * + * @param string $displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 + * + * @return $this + */ + public function setDisplayName($displayName) + { + $this->container['displayName'] = $displayName; + return $this; + } + + /** + * Gets enterpriseProjectId + * 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/CreateTopicResponse.php b/Services/Smn/V2/Model/CreateTopicResponse.php new file mode 100755 index 0000000..8905e89 --- /dev/null +++ b/Services/Smn/V2/Model/CreateTopicResponse.php @@ -0,0 +1,301 @@ + 'string', + 'topicUrn' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * topicUrn Topic的唯一的资源标识,可通过查询主题列表获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'topicUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * topicUrn Topic的唯一的资源标识,可通过查询主题列表获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'topicUrn' => 'topic_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * topicUrn Topic的唯一的资源标识,可通过查询主题列表获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'topicUrn' => 'setTopicUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * topicUrn Topic的唯一的资源标识,可通过查询主题列表获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'topicUrn' => 'getTopicUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过查询主题列表获取该标识。 + * + * @return string|null + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string|null $topicUrn Topic的唯一的资源标识,可通过查询主题列表获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteApplicationEndpointRequest.php b/Services/Smn/V2/Model/DeleteApplicationEndpointRequest.php new file mode 100755 index 0000000..98ce8ad --- /dev/null +++ b/Services/Smn/V2/Model/DeleteApplicationEndpointRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'endpointUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'endpointUrn' => 'endpoint_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'endpointUrn' => 'setEndpointUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'endpointUrn' => 'getEndpointUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['endpointUrn'] = isset($data['endpointUrn']) ? $data['endpointUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['endpointUrn'] === null) { + $invalidProperties[] = "'endpointUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets endpointUrn + * Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @return string + */ + public function getEndpointUrn() + { + return $this->container['endpointUrn']; + } + + /** + * Sets endpointUrn + * + * @param string $endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @return $this + */ + public function setEndpointUrn($endpointUrn) + { + $this->container['endpointUrn'] = $endpointUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteApplicationEndpointResponse.php b/Services/Smn/V2/Model/DeleteApplicationEndpointResponse.php new file mode 100755 index 0000000..d3acbeb --- /dev/null +++ b/Services/Smn/V2/Model/DeleteApplicationEndpointResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteApplicationRequest.php b/Services/Smn/V2/Model/DeleteApplicationRequest.php new file mode 100755 index 0000000..e06630f --- /dev/null +++ b/Services/Smn/V2/Model/DeleteApplicationRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationUrn' => 'application_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'applicationUrn' => 'setApplicationUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'applicationUrn' => 'getApplicationUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationUrn'] = isset($data['applicationUrn']) ? $data['applicationUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['applicationUrn'] === null) { + $invalidProperties[] = "'applicationUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets applicationUrn + * Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return string + */ + public function getApplicationUrn() + { + return $this->container['applicationUrn']; + } + + /** + * Sets applicationUrn + * + * @param string $applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return $this + */ + public function setApplicationUrn($applicationUrn) + { + $this->container['applicationUrn'] = $applicationUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteApplicationResponse.php b/Services/Smn/V2/Model/DeleteApplicationResponse.php new file mode 100755 index 0000000..b4921aa --- /dev/null +++ b/Services/Smn/V2/Model/DeleteApplicationResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteMessageTemplateRequest.php b/Services/Smn/V2/Model/DeleteMessageTemplateRequest.php new file mode 100755 index 0000000..6836c48 --- /dev/null +++ b/Services/Smn/V2/Model/DeleteMessageTemplateRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'messageTemplateId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageTemplateId' => 'message_template_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'messageTemplateId' => 'setMessageTemplateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'messageTemplateId' => 'getMessageTemplateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageTemplateId'] = isset($data['messageTemplateId']) ? $data['messageTemplateId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['messageTemplateId'] === null) { + $invalidProperties[] = "'messageTemplateId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets messageTemplateId + * 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @return string + */ + public function getMessageTemplateId() + { + return $this->container['messageTemplateId']; + } + + /** + * Sets messageTemplateId + * + * @param string $messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @return $this + */ + public function setMessageTemplateId($messageTemplateId) + { + $this->container['messageTemplateId'] = $messageTemplateId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteMessageTemplateResponse.php b/Services/Smn/V2/Model/DeleteMessageTemplateResponse.php new file mode 100755 index 0000000..ad6c377 --- /dev/null +++ b/Services/Smn/V2/Model/DeleteMessageTemplateResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteResourceTagRequest.php b/Services/Smn/V2/Model/DeleteResourceTagRequest.php new file mode 100755 index 0000000..15ec6be --- /dev/null +++ b/Services/Smn/V2/Model/DeleteResourceTagRequest.php @@ -0,0 +1,344 @@ + 'string', + 'resourceId' => 'string', + 'key' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceType 资源类型,目前有: smn_topic,主题。 smn_sms,短信。 smn_application,移动推送。 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * key 待删除标签的key值。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceType' => null, + 'resourceId' => null, + 'key' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceType 资源类型,目前有: smn_topic,主题。 smn_sms,短信。 smn_application,移动推送。 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * key 待删除标签的key值。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceType' => 'resource_type', + 'resourceId' => 'resource_id', + 'key' => 'key' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceType 资源类型,目前有: smn_topic,主题。 smn_sms,短信。 smn_application,移动推送。 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * key 待删除标签的key值。 + * + * @var string[] + */ + protected static $setters = [ + 'resourceType' => 'setResourceType', + 'resourceId' => 'setResourceId', + 'key' => 'setKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceType 资源类型,目前有: smn_topic,主题。 smn_sms,短信。 smn_application,移动推送。 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * key 待删除标签的key值。 + * + * @var string[] + */ + protected static $getters = [ + 'resourceType' => 'getResourceType', + 'resourceId' => 'getResourceId', + 'key' => 'getKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceType'] = isset($data['resourceType']) ? $data['resourceType'] : null; + $this->container['resourceId'] = isset($data['resourceId']) ? $data['resourceId'] : null; + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceType'] === null) { + $invalidProperties[] = "'resourceType' can't be null"; + } + if ($this->container['resourceId'] === null) { + $invalidProperties[] = "'resourceId' can't be null"; + } + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceType + * 资源类型,目前有: smn_topic,主题。 smn_sms,短信。 smn_application,移动推送。 + * + * @return string + */ + public function getResourceType() + { + return $this->container['resourceType']; + } + + /** + * Sets resourceType + * + * @param string $resourceType 资源类型,目前有: smn_topic,主题。 smn_sms,短信。 smn_application,移动推送。 + * + * @return $this + */ + public function setResourceType($resourceType) + { + $this->container['resourceType'] = $resourceType; + return $this; + } + + /** + * Gets resourceId + * 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return string + */ + public function getResourceId() + { + return $this->container['resourceId']; + } + + /** + * Sets resourceId + * + * @param string $resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return $this + */ + public function setResourceId($resourceId) + { + $this->container['resourceId'] = $resourceId; + return $this; + } + + /** + * Gets key + * 待删除标签的key值。 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 待删除标签的key值。 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteResourceTagResponse.php b/Services/Smn/V2/Model/DeleteResourceTagResponse.php new file mode 100755 index 0000000..ec86922 --- /dev/null +++ b/Services/Smn/V2/Model/DeleteResourceTagResponse.php @@ -0,0 +1,236 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteTopicAttributeByNameRequest.php b/Services/Smn/V2/Model/DeleteTopicAttributeByNameRequest.php new file mode 100755 index 0000000..73bc2ea --- /dev/null +++ b/Services/Smn/V2/Model/DeleteTopicAttributeByNameRequest.php @@ -0,0 +1,306 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets name + * 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteTopicAttributeByNameResponse.php b/Services/Smn/V2/Model/DeleteTopicAttributeByNameResponse.php new file mode 100755 index 0000000..6fc4168 --- /dev/null +++ b/Services/Smn/V2/Model/DeleteTopicAttributeByNameResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteTopicAttributesRequest.php b/Services/Smn/V2/Model/DeleteTopicAttributesRequest.php new file mode 100755 index 0000000..01cccd2 --- /dev/null +++ b/Services/Smn/V2/Model/DeleteTopicAttributesRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteTopicAttributesResponse.php b/Services/Smn/V2/Model/DeleteTopicAttributesResponse.php new file mode 100755 index 0000000..1dd675a --- /dev/null +++ b/Services/Smn/V2/Model/DeleteTopicAttributesResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteTopicRequest.php b/Services/Smn/V2/Model/DeleteTopicRequest.php new file mode 100755 index 0000000..12d0204 --- /dev/null +++ b/Services/Smn/V2/Model/DeleteTopicRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/DeleteTopicResponse.php b/Services/Smn/V2/Model/DeleteTopicResponse.php new file mode 100755 index 0000000..fe46bb1 --- /dev/null +++ b/Services/Smn/V2/Model/DeleteTopicResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/LinksItem.php b/Services/Smn/V2/Model/LinksItem.php new file mode 100755 index 0000000..d4db18b --- /dev/null +++ b/Services/Smn/V2/Model/LinksItem.php @@ -0,0 +1,306 @@ + 'string', + 'rel' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * href 对应快捷链接。 + * rel 快捷链接标记名称。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'href' => null, + 'rel' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * href 对应快捷链接。 + * rel 快捷链接标记名称。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href', + 'rel' => 'rel' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * href 对应快捷链接。 + * rel 快捷链接标记名称。 + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref', + 'rel' => 'setRel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * href 对应快捷链接。 + * rel 快捷链接标记名称。 + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref', + 'rel' => 'getRel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['href'] = isset($data['href']) ? $data['href'] : null; + $this->container['rel'] = isset($data['rel']) ? $data['rel'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['href'] === null) { + $invalidProperties[] = "'href' can't be null"; + } + if ($this->container['rel'] === null) { + $invalidProperties[] = "'rel' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * 对应快捷链接。 + * + * @return string + */ + public function getHref() + { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string $href 对应快捷链接。 + * + * @return $this + */ + public function setHref($href) + { + $this->container['href'] = $href; + return $this; + } + + /** + * Gets rel + * 快捷链接标记名称。 + * + * @return string + */ + public function getRel() + { + return $this->container['rel']; + } + + /** + * Sets rel + * + * @param string $rel 快捷链接标记名称。 + * + * @return $this + */ + public function setRel($rel) + { + $this->container['rel'] = $rel; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationAttributesRequest.php b/Services/Smn/V2/Model/ListApplicationAttributesRequest.php new file mode 100755 index 0000000..6ef118c --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationAttributesRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationUrn' => 'application_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'applicationUrn' => 'setApplicationUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'applicationUrn' => 'getApplicationUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationUrn'] = isset($data['applicationUrn']) ? $data['applicationUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['applicationUrn'] === null) { + $invalidProperties[] = "'applicationUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets applicationUrn + * Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return string + */ + public function getApplicationUrn() + { + return $this->container['applicationUrn']; + } + + /** + * Sets applicationUrn + * + * @param string $applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return $this + */ + public function setApplicationUrn($applicationUrn) + { + $this->container['applicationUrn'] = $applicationUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationAttributesResponse.php b/Services/Smn/V2/Model/ListApplicationAttributesResponse.php new file mode 100755 index 0000000..58dc8ad --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationAttributesResponse.php @@ -0,0 +1,336 @@ + 'string', + 'applicationId' => 'string', + 'attributes' => '\G42Cloud\SDK\Smn\V2\Model\ListApplicationAttributesResponseBodyAttributes' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * applicationId Application的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'applicationId' => null, + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * applicationId Application的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'applicationId' => 'application_id', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * applicationId Application的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'applicationId' => 'setApplicationId', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * applicationId Application的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'applicationId' => 'getApplicationId', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets applicationId + * Application的唯一标识ID。 + * + * @return string|null + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param string|null $applicationId Application的唯一标识ID。 + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + return $this; + } + + /** + * Gets attributes + * attributes + * + * @return \G42Cloud\SDK\Smn\V2\Model\ListApplicationAttributesResponseBodyAttributes|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \G42Cloud\SDK\Smn\V2\Model\ListApplicationAttributesResponseBodyAttributes|null $attributes attributes + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationAttributesResponseBodyAttributes.php b/Services/Smn/V2/Model/ListApplicationAttributesResponseBodyAttributes.php new file mode 100755 index 0000000..e438f24 --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationAttributesResponseBodyAttributes.php @@ -0,0 +1,303 @@ + 'string', + 'appleCertificateExpirationDate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间,APNS、APNS_SANDBOX平台特有属性 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'enabled' => null, + 'appleCertificateExpirationDate' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间,APNS、APNS_SANDBOX平台特有属性 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'appleCertificateExpirationDate' => 'apple_certificate_expiration_date' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间,APNS、APNS_SANDBOX平台特有属性 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'appleCertificateExpirationDate' => 'setAppleCertificateExpirationDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * enabled 应用平台是否启用。 + * appleCertificateExpirationDate 苹果证书过期时间,APNS、APNS_SANDBOX平台特有属性 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'appleCertificateExpirationDate' => 'getAppleCertificateExpirationDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['appleCertificateExpirationDate'] = isset($data['appleCertificateExpirationDate']) ? $data['appleCertificateExpirationDate'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets enabled + * 应用平台是否启用。 + * + * @return string + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param string $enabled 应用平台是否启用。 + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + return $this; + } + + /** + * Gets appleCertificateExpirationDate + * 苹果证书过期时间,APNS、APNS_SANDBOX平台特有属性 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string|null + */ + public function getAppleCertificateExpirationDate() + { + return $this->container['appleCertificateExpirationDate']; + } + + /** + * Sets appleCertificateExpirationDate + * + * @param string|null $appleCertificateExpirationDate 苹果证书过期时间,APNS、APNS_SANDBOX平台特有属性 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setAppleCertificateExpirationDate($appleCertificateExpirationDate) + { + $this->container['appleCertificateExpirationDate'] = $appleCertificateExpirationDate; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationEndpointAttributesRequest.php b/Services/Smn/V2/Model/ListApplicationEndpointAttributesRequest.php new file mode 100755 index 0000000..cdd611c --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationEndpointAttributesRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'endpointUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'endpointUrn' => 'endpoint_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'endpointUrn' => 'setEndpointUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'endpointUrn' => 'getEndpointUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['endpointUrn'] = isset($data['endpointUrn']) ? $data['endpointUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['endpointUrn'] === null) { + $invalidProperties[] = "'endpointUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets endpointUrn + * Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @return string + */ + public function getEndpointUrn() + { + return $this->container['endpointUrn']; + } + + /** + * Sets endpointUrn + * + * @param string $endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @return $this + */ + public function setEndpointUrn($endpointUrn) + { + $this->container['endpointUrn'] = $endpointUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationEndpointAttributesResponse.php b/Services/Smn/V2/Model/ListApplicationEndpointAttributesResponse.php new file mode 100755 index 0000000..bf990e2 --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationEndpointAttributesResponse.php @@ -0,0 +1,301 @@ + 'string', + 'attributes' => '\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointAttributesResponseBodyAttributes' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets attributes + * attributes + * + * @return \G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointAttributesResponseBodyAttributes|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointAttributesResponseBodyAttributes|null $attributes attributes + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationEndpointAttributesResponseBodyAttributes.php b/Services/Smn/V2/Model/ListApplicationEndpointAttributesResponseBodyAttributes.php new file mode 100755 index 0000000..ab5e98b --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationEndpointAttributesResponseBodyAttributes.php @@ -0,0 +1,344 @@ + 'string', + 'token' => 'string', + 'userData' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * enabled 设备是否可用。 + * token 设备token。 + * userData 用户数据。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'enabled' => null, + 'token' => null, + 'userData' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * enabled 设备是否可用。 + * token 设备token。 + * userData 用户数据。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'token' => 'token', + 'userData' => 'user_data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * enabled 设备是否可用。 + * token 设备token。 + * userData 用户数据。 + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'token' => 'setToken', + 'userData' => 'setUserData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * enabled 设备是否可用。 + * token 设备token。 + * userData 用户数据。 + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'token' => 'getToken', + 'userData' => 'getUserData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['userData'] = isset($data['userData']) ? $data['userData'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' can't be null"; + } + if ($this->container['userData'] === null) { + $invalidProperties[] = "'userData' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets enabled + * 设备是否可用。 + * + * @return string + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param string $enabled 设备是否可用。 + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + return $this; + } + + /** + * Gets token + * 设备token。 + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token 设备token。 + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + return $this; + } + + /** + * Gets userData + * 用户数据。 + * + * @return string + */ + public function getUserData() + { + return $this->container['userData']; + } + + /** + * Sets userData + * + * @param string $userData 用户数据。 + * + * @return $this + */ + public function setUserData($userData) + { + $this->container['userData'] = $userData; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationEndpointsRequest.php b/Services/Smn/V2/Model/ListApplicationEndpointsRequest.php new file mode 100755 index 0000000..e712e3f --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationEndpointsRequest.php @@ -0,0 +1,443 @@ + 'string', + 'offset' => 'int', + 'limit' => 'int', + 'enabled' => 'string', + 'token' => 'string', + 'userData' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enabled 设备是否可用,值为true或false字符串。 + * token 设备token,最大长度512个字节。 + * userData 用户数据,最大长度2048个字节。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationUrn' => null, + 'offset' => null, + 'limit' => null, + 'enabled' => null, + 'token' => null, + 'userData' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enabled 设备是否可用,值为true或false字符串。 + * token 设备token,最大长度512个字节。 + * userData 用户数据,最大长度2048个字节。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationUrn' => 'application_urn', + 'offset' => 'offset', + 'limit' => 'limit', + 'enabled' => 'enabled', + 'token' => 'token', + 'userData' => 'user_data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enabled 设备是否可用,值为true或false字符串。 + * token 设备token,最大长度512个字节。 + * userData 用户数据,最大长度2048个字节。 + * + * @var string[] + */ + protected static $setters = [ + 'applicationUrn' => 'setApplicationUrn', + 'offset' => 'setOffset', + 'limit' => 'setLimit', + 'enabled' => 'setEnabled', + 'token' => 'setToken', + 'userData' => 'setUserData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enabled 设备是否可用,值为true或false字符串。 + * token 设备token,最大长度512个字节。 + * userData 用户数据,最大长度2048个字节。 + * + * @var string[] + */ + protected static $getters = [ + 'applicationUrn' => 'getApplicationUrn', + 'offset' => 'getOffset', + 'limit' => 'getLimit', + 'enabled' => 'getEnabled', + 'token' => 'getToken', + 'userData' => 'getUserData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationUrn'] = isset($data['applicationUrn']) ? $data['applicationUrn'] : null; + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : 0; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 100; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['userData'] = isset($data['userData']) ? $data['userData'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['applicationUrn'] === null) { + $invalidProperties[] = "'applicationUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets applicationUrn + * Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return string + */ + public function getApplicationUrn() + { + return $this->container['applicationUrn']; + } + + /** + * Sets applicationUrn + * + * @param string $applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return $this + */ + public function setApplicationUrn($applicationUrn) + { + $this->container['applicationUrn'] = $applicationUrn; + return $this; + } + + /** + * Gets offset + * 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return int|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int|null $offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets limit + * 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets enabled + * 设备是否可用,值为true或false字符串。 + * + * @return string|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param string|null $enabled 设备是否可用,值为true或false字符串。 + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + return $this; + } + + /** + * Gets token + * 设备token,最大长度512个字节。 + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token 设备token,最大长度512个字节。 + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + return $this; + } + + /** + * Gets userData + * 用户数据,最大长度2048个字节。 + * + * @return string|null + */ + public function getUserData() + { + return $this->container['userData']; + } + + /** + * Sets userData + * + * @param string|null $userData 用户数据,最大长度2048个字节。 + * + * @return $this + */ + public function setUserData($userData) + { + $this->container['userData'] = $userData; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationEndpointsResponse.php b/Services/Smn/V2/Model/ListApplicationEndpointsResponse.php new file mode 100755 index 0000000..5c440c0 --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationEndpointsResponse.php @@ -0,0 +1,336 @@ + 'string', + 'nextPageFlag' => 'bool', + 'endpoints' => '\G42Cloud\SDK\Smn\V2\Model\ApplicationEndpoint[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * nextPageFlag 是否有下一页标识。 + * endpoints Application_endpoint结构体数。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'nextPageFlag' => null, + 'endpoints' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * nextPageFlag 是否有下一页标识。 + * endpoints Application_endpoint结构体数。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'nextPageFlag' => 'next_page_flag', + 'endpoints' => 'endpoints' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * nextPageFlag 是否有下一页标识。 + * endpoints Application_endpoint结构体数。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'nextPageFlag' => 'setNextPageFlag', + 'endpoints' => 'setEndpoints' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * nextPageFlag 是否有下一页标识。 + * endpoints Application_endpoint结构体数。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'nextPageFlag' => 'getNextPageFlag', + 'endpoints' => 'getEndpoints' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['nextPageFlag'] = isset($data['nextPageFlag']) ? $data['nextPageFlag'] : null; + $this->container['endpoints'] = isset($data['endpoints']) ? $data['endpoints'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets nextPageFlag + * 是否有下一页标识。 + * + * @return bool|null + */ + public function getNextPageFlag() + { + return $this->container['nextPageFlag']; + } + + /** + * Sets nextPageFlag + * + * @param bool|null $nextPageFlag 是否有下一页标识。 + * + * @return $this + */ + public function setNextPageFlag($nextPageFlag) + { + $this->container['nextPageFlag'] = $nextPageFlag; + return $this; + } + + /** + * Gets endpoints + * Application_endpoint结构体数。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ApplicationEndpoint[]|null + */ + public function getEndpoints() + { + return $this->container['endpoints']; + } + + /** + * Sets endpoints + * + * @param \G42Cloud\SDK\Smn\V2\Model\ApplicationEndpoint[]|null $endpoints Application_endpoint结构体数。 + * + * @return $this + */ + public function setEndpoints($endpoints) + { + $this->container['endpoints'] = $endpoints; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationsRequest.php b/Services/Smn/V2/Model/ListApplicationsRequest.php new file mode 100755 index 0000000..100306b --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationsRequest.php @@ -0,0 +1,370 @@ + 'int', + 'limit' => 'int', + 'name' => 'string', + 'platform' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * name 检索应用名称。 支持后向模糊匹配,长度不得超过64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'offset' => null, + 'limit' => null, + 'name' => null, + 'platform' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * name 检索应用名称。 支持后向模糊匹配,长度不得超过64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'offset' => 'offset', + 'limit' => 'limit', + 'name' => 'name', + 'platform' => 'platform' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * name 检索应用名称。 支持后向模糊匹配,长度不得超过64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @var string[] + */ + protected static $setters = [ + 'offset' => 'setOffset', + 'limit' => 'setLimit', + 'name' => 'setName', + 'platform' => 'setPlatform' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * name 检索应用名称。 支持后向模糊匹配,长度不得超过64个字符,只能包含英文字母、下划线和数字。 + * platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @var string[] + */ + protected static $getters = [ + 'offset' => 'getOffset', + 'limit' => 'getLimit', + 'name' => 'getName', + 'platform' => 'getPlatform' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : 0; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 100; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets offset + * 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return int|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int|null $offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets limit + * 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets name + * 检索应用名称。 支持后向模糊匹配,长度不得超过64个字符,只能包含英文字母、下划线和数字。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 检索应用名称。 支持后向模糊匹配,长度不得超过64个字符,只能包含英文字母、下划线和数字。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets platform + * 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform 应用平台。 目前仅支持HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 + * + * @return $this + */ + public function setPlatform($platform) + { + $this->container['platform'] = $platform; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListApplicationsResponse.php b/Services/Smn/V2/Model/ListApplicationsResponse.php new file mode 100755 index 0000000..a25a816 --- /dev/null +++ b/Services/Smn/V2/Model/ListApplicationsResponse.php @@ -0,0 +1,336 @@ + 'string', + 'applicationCount' => 'int', + 'applications' => '\G42Cloud\SDK\Smn\V2\Model\ApplicationItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * applicationCount 返回的Application个数。该参数不受offset和limit影响,即返回的是您账户下所有的Application个数。 + * applications applications + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'applicationCount' => null, + 'applications' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * applicationCount 返回的Application个数。该参数不受offset和limit影响,即返回的是您账户下所有的Application个数。 + * applications applications + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'applicationCount' => 'application_count', + 'applications' => 'applications' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * applicationCount 返回的Application个数。该参数不受offset和limit影响,即返回的是您账户下所有的Application个数。 + * applications applications + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'applicationCount' => 'setApplicationCount', + 'applications' => 'setApplications' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * applicationCount 返回的Application个数。该参数不受offset和limit影响,即返回的是您账户下所有的Application个数。 + * applications applications + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'applicationCount' => 'getApplicationCount', + 'applications' => 'getApplications' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['applicationCount'] = isset($data['applicationCount']) ? $data['applicationCount'] : null; + $this->container['applications'] = isset($data['applications']) ? $data['applications'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets applicationCount + * 返回的Application个数。该参数不受offset和limit影响,即返回的是您账户下所有的Application个数。 + * + * @return int|null + */ + public function getApplicationCount() + { + return $this->container['applicationCount']; + } + + /** + * Sets applicationCount + * + * @param int|null $applicationCount 返回的Application个数。该参数不受offset和limit影响,即返回的是您账户下所有的Application个数。 + * + * @return $this + */ + public function setApplicationCount($applicationCount) + { + $this->container['applicationCount'] = $applicationCount; + return $this; + } + + /** + * Gets applications + * applications + * + * @return \G42Cloud\SDK\Smn\V2\Model\ApplicationItem[]|null + */ + public function getApplications() + { + return $this->container['applications']; + } + + /** + * Sets applications + * + * @param \G42Cloud\SDK\Smn\V2\Model\ApplicationItem[]|null $applications applications + * + * @return $this + */ + public function setApplications($applications) + { + $this->container['applications'] = $applications; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListInstanceRequestBody.php b/Services/Smn/V2/Model/ListInstanceRequestBody.php new file mode 100755 index 0000000..7da5237 --- /dev/null +++ b/Services/Smn/V2/Model/ListInstanceRequestBody.php @@ -0,0 +1,513 @@ + '\G42Cloud\SDK\Smn\V2\Model\ResourceTags[]', + 'tagsAny' => '\G42Cloud\SDK\Smn\V2\Model\ResourceTags[]', + 'notTags' => '\G42Cloud\SDK\Smn\V2\Model\ResourceTags[]', + 'notTagsAny' => '\G42Cloud\SDK\Smn\V2\Model\ResourceTags[]', + 'offset' => 'string', + 'limit' => 'string', + 'action' => 'string', + 'matches' => '\G42Cloud\SDK\Smn\V2\Model\TagMatch[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与的关系。 + * tagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或的关系。 + * notTags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与非的关系。 + * notTagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或非的关系。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数,查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数。 action为count时无此参数。 action为filter时,默认为0,必须为数字,且不能为负数。 + * limit 查询记录数。 action为count时无此参数。 action为filter时,默认为1000。limit最多为1000,不能为负数,最小值为1。 + * action 操作标识(仅限于filter,count):filter(过滤),count(查询总条数)。 为filter时表示分页查询,为count只需按照条件将总条数返回即可。 + * matches 搜索字段。 key为要匹配的字段,当前只支持resource_name。 value为匹配的值,当前为精确匹配。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tags' => null, + 'tagsAny' => null, + 'notTags' => null, + 'notTagsAny' => null, + 'offset' => null, + 'limit' => null, + 'action' => null, + 'matches' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与的关系。 + * tagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或的关系。 + * notTags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与非的关系。 + * notTagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或非的关系。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数,查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数。 action为count时无此参数。 action为filter时,默认为0,必须为数字,且不能为负数。 + * limit 查询记录数。 action为count时无此参数。 action为filter时,默认为1000。limit最多为1000,不能为负数,最小值为1。 + * action 操作标识(仅限于filter,count):filter(过滤),count(查询总条数)。 为filter时表示分页查询,为count只需按照条件将总条数返回即可。 + * matches 搜索字段。 key为要匹配的字段,当前只支持resource_name。 value为匹配的值,当前为精确匹配。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tags' => 'tags', + 'tagsAny' => 'tags_any', + 'notTags' => 'not_tags', + 'notTagsAny' => 'not_tags_any', + 'offset' => 'offset', + 'limit' => 'limit', + 'action' => 'action', + 'matches' => 'matches' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与的关系。 + * tagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或的关系。 + * notTags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与非的关系。 + * notTagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或非的关系。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数,查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数。 action为count时无此参数。 action为filter时,默认为0,必须为数字,且不能为负数。 + * limit 查询记录数。 action为count时无此参数。 action为filter时,默认为1000。limit最多为1000,不能为负数,最小值为1。 + * action 操作标识(仅限于filter,count):filter(过滤),count(查询总条数)。 为filter时表示分页查询,为count只需按照条件将总条数返回即可。 + * matches 搜索字段。 key为要匹配的字段,当前只支持resource_name。 value为匹配的值,当前为精确匹配。 + * + * @var string[] + */ + protected static $setters = [ + 'tags' => 'setTags', + 'tagsAny' => 'setTagsAny', + 'notTags' => 'setNotTags', + 'notTagsAny' => 'setNotTagsAny', + 'offset' => 'setOffset', + 'limit' => 'setLimit', + 'action' => 'setAction', + 'matches' => 'setMatches' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与的关系。 + * tagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或的关系。 + * notTags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与非的关系。 + * notTagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或非的关系。 + * offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数,查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数。 action为count时无此参数。 action为filter时,默认为0,必须为数字,且不能为负数。 + * limit 查询记录数。 action为count时无此参数。 action为filter时,默认为1000。limit最多为1000,不能为负数,最小值为1。 + * action 操作标识(仅限于filter,count):filter(过滤),count(查询总条数)。 为filter时表示分页查询,为count只需按照条件将总条数返回即可。 + * matches 搜索字段。 key为要匹配的字段,当前只支持resource_name。 value为匹配的值,当前为精确匹配。 + * + * @var string[] + */ + protected static $getters = [ + 'tags' => 'getTags', + 'tagsAny' => 'getTagsAny', + 'notTags' => 'getNotTags', + 'notTagsAny' => 'getNotTagsAny', + 'offset' => 'getOffset', + 'limit' => 'getLimit', + 'action' => 'getAction', + 'matches' => 'getMatches' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['tagsAny'] = isset($data['tagsAny']) ? $data['tagsAny'] : null; + $this->container['notTags'] = isset($data['notTags']) ? $data['notTags'] : null; + $this->container['notTagsAny'] = isset($data['notTagsAny']) ? $data['notTagsAny'] : null; + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : '0'; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : '1000'; + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['matches'] = isset($data['matches']) ? $data['matches'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['action'] === null) { + $invalidProperties[] = "'action' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tags + * 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与的关系。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null $tags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与的关系。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets tagsAny + * 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或的关系。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null + */ + public function getTagsAny() + { + return $this->container['tagsAny']; + } + + /** + * Sets tagsAny + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null $tagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或的关系。 + * + * @return $this + */ + public function setTagsAny($tagsAny) + { + $this->container['tagsAny'] = $tagsAny; + return $this; + } + + /** + * Gets notTags + * 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与非的关系。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null + */ + public function getNotTags() + { + return $this->container['notTags']; + } + + /** + * Sets notTags + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null $notTags 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为与非的关系。 + * + * @return $this + */ + public function setNotTags($notTags) + { + $this->container['notTags'] = $notTags; + return $this; + } + + /** + * Gets notTagsAny + * 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或非的关系。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null + */ + public function getNotTagsAny() + { + return $this->container['notTagsAny']; + } + + /** + * Sets notTagsAny + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null $notTagsAny 最多包含10个key,每个key最多包含10个value,结构体不能缺失。key不能为空或者空字符串。key不能重复,同一个key中value不能重复,不同key对应的资源之间为或非的关系。 + * + * @return $this + */ + public function setNotTagsAny($notTagsAny) + { + $this->container['notTagsAny'] = $notTagsAny; + return $this; + } + + /** + * Gets offset + * 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数,查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数。 action为count时无此参数。 action为filter时,默认为0,必须为数字,且不能为负数。 + * + * @return string|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param string|null $offset 索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数,查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数。 action为count时无此参数。 action为filter时,默认为0,必须为数字,且不能为负数。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets limit + * 查询记录数。 action为count时无此参数。 action为filter时,默认为1000。limit最多为1000,不能为负数,最小值为1。 + * + * @return string|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param string|null $limit 查询记录数。 action为count时无此参数。 action为filter时,默认为1000。limit最多为1000,不能为负数,最小值为1。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets action + * 操作标识(仅限于filter,count):filter(过滤),count(查询总条数)。 为filter时表示分页查询,为count只需按照条件将总条数返回即可。 + * + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string $action 操作标识(仅限于filter,count):filter(过滤),count(查询总条数)。 为filter时表示分页查询,为count只需按照条件将总条数返回即可。 + * + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + return $this; + } + + /** + * Gets matches + * 搜索字段。 key为要匹配的字段,当前只支持resource_name。 value为匹配的值,当前为精确匹配。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\TagMatch[]|null + */ + public function getMatches() + { + return $this->container['matches']; + } + + /** + * Sets matches + * + * @param \G42Cloud\SDK\Smn\V2\Model\TagMatch[]|null $matches 搜索字段。 key为要匹配的字段,当前只支持resource_name。 value为匹配的值,当前为精确匹配。 + * + * @return $this + */ + public function setMatches($matches) + { + $this->container['matches'] = $matches; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListMessageTemplateDetailsRequest.php b/Services/Smn/V2/Model/ListMessageTemplateDetailsRequest.php new file mode 100755 index 0000000..b9f531a --- /dev/null +++ b/Services/Smn/V2/Model/ListMessageTemplateDetailsRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'messageTemplateId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageTemplateId' => 'message_template_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'messageTemplateId' => 'setMessageTemplateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'messageTemplateId' => 'getMessageTemplateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageTemplateId'] = isset($data['messageTemplateId']) ? $data['messageTemplateId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['messageTemplateId'] === null) { + $invalidProperties[] = "'messageTemplateId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets messageTemplateId + * 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @return string + */ + public function getMessageTemplateId() + { + return $this->container['messageTemplateId']; + } + + /** + * Sets messageTemplateId + * + * @param string $messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @return $this + */ + public function setMessageTemplateId($messageTemplateId) + { + $this->container['messageTemplateId'] = $messageTemplateId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListMessageTemplateDetailsResponse.php b/Services/Smn/V2/Model/ListMessageTemplateDetailsResponse.php new file mode 100755 index 0000000..cd46597 --- /dev/null +++ b/Services/Smn/V2/Model/ListMessageTemplateDetailsResponse.php @@ -0,0 +1,511 @@ + 'string', + 'messageTemplateName' => 'string', + 'protocol' => 'string', + 'tagNames' => 'string[]', + 'createTime' => 'string', + 'updateTime' => 'string', + 'content' => 'string', + 'requestId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表。 是消息模板“{}”内的字段,在具体使用消息模板时,可根据实际情况替为该字段赋值。 + * createTime 模板创建时间。 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * content 模板内容。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'messageTemplateId' => null, + 'messageTemplateName' => null, + 'protocol' => null, + 'tagNames' => null, + 'createTime' => null, + 'updateTime' => null, + 'content' => null, + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表。 是消息模板“{}”内的字段,在具体使用消息模板时,可根据实际情况替为该字段赋值。 + * createTime 模板创建时间。 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * content 模板内容。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageTemplateId' => 'message_template_id', + 'messageTemplateName' => 'message_template_name', + 'protocol' => 'protocol', + 'tagNames' => 'tag_names', + 'createTime' => 'create_time', + 'updateTime' => 'update_time', + 'content' => 'content', + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表。 是消息模板“{}”内的字段,在具体使用消息模板时,可根据实际情况替为该字段赋值。 + * createTime 模板创建时间。 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * content 模板内容。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'messageTemplateId' => 'setMessageTemplateId', + 'messageTemplateName' => 'setMessageTemplateName', + 'protocol' => 'setProtocol', + 'tagNames' => 'setTagNames', + 'createTime' => 'setCreateTime', + 'updateTime' => 'setUpdateTime', + 'content' => 'setContent', + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表。 是消息模板“{}”内的字段,在具体使用消息模板时,可根据实际情况替为该字段赋值。 + * createTime 模板创建时间。 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * content 模板内容。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'messageTemplateId' => 'getMessageTemplateId', + 'messageTemplateName' => 'getMessageTemplateName', + 'protocol' => 'getProtocol', + 'tagNames' => 'getTagNames', + 'createTime' => 'getCreateTime', + 'updateTime' => 'getUpdateTime', + 'content' => 'getContent', + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageTemplateId'] = isset($data['messageTemplateId']) ? $data['messageTemplateId'] : null; + $this->container['messageTemplateName'] = isset($data['messageTemplateName']) ? $data['messageTemplateName'] : null; + $this->container['protocol'] = isset($data['protocol']) ? $data['protocol'] : null; + $this->container['tagNames'] = isset($data['tagNames']) ? $data['tagNames'] : null; + $this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null; + $this->container['updateTime'] = isset($data['updateTime']) ? $data['updateTime'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets messageTemplateId + * 模板ID。 + * + * @return string|null + */ + public function getMessageTemplateId() + { + return $this->container['messageTemplateId']; + } + + /** + * Sets messageTemplateId + * + * @param string|null $messageTemplateId 模板ID。 + * + * @return $this + */ + public function setMessageTemplateId($messageTemplateId) + { + $this->container['messageTemplateId'] = $messageTemplateId; + return $this; + } + + /** + * Gets messageTemplateName + * 模板名称。 + * + * @return string|null + */ + public function getMessageTemplateName() + { + return $this->container['messageTemplateName']; + } + + /** + * Sets messageTemplateName + * + * @param string|null $messageTemplateName 模板名称。 + * + * @return $this + */ + public function setMessageTemplateName($messageTemplateName) + { + $this->container['messageTemplateName'] = $messageTemplateName; + return $this; + } + + /** + * Gets protocol + * 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return string|null + */ + public function getProtocol() + { + return $this->container['protocol']; + } + + /** + * Sets protocol + * + * @param string|null $protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return $this + */ + public function setProtocol($protocol) + { + $this->container['protocol'] = $protocol; + return $this; + } + + /** + * Gets tagNames + * 模板tag列表。 是消息模板“{}”内的字段,在具体使用消息模板时,可根据实际情况替为该字段赋值。 + * + * @return string[]|null + */ + public function getTagNames() + { + return $this->container['tagNames']; + } + + /** + * Sets tagNames + * + * @param string[]|null $tagNames 模板tag列表。 是消息模板“{}”内的字段,在具体使用消息模板时,可根据实际情况替为该字段赋值。 + * + * @return $this + */ + public function setTagNames($tagNames) + { + $this->container['tagNames'] = $tagNames; + return $this; + } + + /** + * Gets createTime + * 模板创建时间。 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string|null + */ + public function getCreateTime() + { + return $this->container['createTime']; + } + + /** + * Sets createTime + * + * @param string|null $createTime 模板创建时间。 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setCreateTime($createTime) + { + $this->container['createTime'] = $createTime; + return $this; + } + + /** + * Gets updateTime + * 模板最后更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string|null + */ + public function getUpdateTime() + { + return $this->container['updateTime']; + } + + /** + * Sets updateTime + * + * @param string|null $updateTime 模板最后更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setUpdateTime($updateTime) + { + $this->container['updateTime'] = $updateTime; + return $this; + } + + /** + * Gets content + * 模板内容。 + * + * @return string|null + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content 模板内容。 + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + return $this; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListMessageTemplatesRequest.php b/Services/Smn/V2/Model/ListMessageTemplatesRequest.php new file mode 100755 index 0000000..765567c --- /dev/null +++ b/Services/Smn/V2/Model/ListMessageTemplatesRequest.php @@ -0,0 +1,370 @@ + 'int', + 'limit' => 'int', + 'messageTemplateName' => 'string', + 'protocol' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * offset 偏移量,偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * messageTemplateName 模板的名称。 只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'offset' => null, + 'limit' => null, + 'messageTemplateName' => null, + 'protocol' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * offset 偏移量,偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * messageTemplateName 模板的名称。 只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'offset' => 'offset', + 'limit' => 'limit', + 'messageTemplateName' => 'message_template_name', + 'protocol' => 'protocol' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * offset 偏移量,偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * messageTemplateName 模板的名称。 只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @var string[] + */ + protected static $setters = [ + 'offset' => 'setOffset', + 'limit' => 'setLimit', + 'messageTemplateName' => 'setMessageTemplateName', + 'protocol' => 'setProtocol' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * offset 偏移量,偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * messageTemplateName 模板的名称。 只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @var string[] + */ + protected static $getters = [ + 'offset' => 'getOffset', + 'limit' => 'getLimit', + 'messageTemplateName' => 'getMessageTemplateName', + 'protocol' => 'getProtocol' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : 0; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 100; + $this->container['messageTemplateName'] = isset($data['messageTemplateName']) ? $data['messageTemplateName'] : null; + $this->container['protocol'] = isset($data['protocol']) ? $data['protocol'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets offset + * 偏移量,偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return int|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int|null $offset 偏移量,偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets limit + * 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets messageTemplateName + * 模板的名称。 只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * + * @return string|null + */ + public function getMessageTemplateName() + { + return $this->container['messageTemplateName']; + } + + /** + * Sets messageTemplateName + * + * @param string|null $messageTemplateName 模板的名称。 只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度在1到64个字符之间。 + * + * @return $this + */ + public function setMessageTemplateName($messageTemplateName) + { + $this->container['messageTemplateName'] = $messageTemplateName; + return $this; + } + + /** + * Gets protocol + * 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return string|null + */ + public function getProtocol() + { + return $this->container['protocol']; + } + + /** + * Sets protocol + * + * @param string|null $protocol 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return $this + */ + public function setProtocol($protocol) + { + $this->container['protocol'] = $protocol; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListMessageTemplatesResponse.php b/Services/Smn/V2/Model/ListMessageTemplatesResponse.php new file mode 100755 index 0000000..b5cf101 --- /dev/null +++ b/Services/Smn/V2/Model/ListMessageTemplatesResponse.php @@ -0,0 +1,336 @@ + 'string', + 'messageTemplateCount' => 'int', + 'messageTemplates' => '\G42Cloud\SDK\Smn\V2\Model\MessageTemplate[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * messageTemplateCount 返回的模板个数。 + * messageTemplates Message_template结构体数组。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'messageTemplateCount' => null, + 'messageTemplates' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * messageTemplateCount 返回的模板个数。 + * messageTemplates Message_template结构体数组。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'messageTemplateCount' => 'message_template_count', + 'messageTemplates' => 'message_templates' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * messageTemplateCount 返回的模板个数。 + * messageTemplates Message_template结构体数组。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'messageTemplateCount' => 'setMessageTemplateCount', + 'messageTemplates' => 'setMessageTemplates' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * messageTemplateCount 返回的模板个数。 + * messageTemplates Message_template结构体数组。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'messageTemplateCount' => 'getMessageTemplateCount', + 'messageTemplates' => 'getMessageTemplates' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['messageTemplateCount'] = isset($data['messageTemplateCount']) ? $data['messageTemplateCount'] : null; + $this->container['messageTemplates'] = isset($data['messageTemplates']) ? $data['messageTemplates'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets messageTemplateCount + * 返回的模板个数。 + * + * @return int|null + */ + public function getMessageTemplateCount() + { + return $this->container['messageTemplateCount']; + } + + /** + * Sets messageTemplateCount + * + * @param int|null $messageTemplateCount 返回的模板个数。 + * + * @return $this + */ + public function setMessageTemplateCount($messageTemplateCount) + { + $this->container['messageTemplateCount'] = $messageTemplateCount; + return $this; + } + + /** + * Gets messageTemplates + * Message_template结构体数组。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\MessageTemplate[]|null + */ + public function getMessageTemplates() + { + return $this->container['messageTemplates']; + } + + /** + * Sets messageTemplates + * + * @param \G42Cloud\SDK\Smn\V2\Model\MessageTemplate[]|null $messageTemplates Message_template结构体数组。 + * + * @return $this + */ + public function setMessageTemplates($messageTemplates) + { + $this->container['messageTemplates'] = $messageTemplates; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListProjectTagsRequest.php b/Services/Smn/V2/Model/ListProjectTagsRequest.php new file mode 100755 index 0000000..5f9288f --- /dev/null +++ b/Services/Smn/V2/Model/ListProjectTagsRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceType' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceType' => 'resource_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @var string[] + */ + protected static $setters = [ + 'resourceType' => 'setResourceType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @var string[] + */ + protected static $getters = [ + 'resourceType' => 'getResourceType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceType'] = isset($data['resourceType']) ? $data['resourceType'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceType'] === null) { + $invalidProperties[] = "'resourceType' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceType + * 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return string + */ + public function getResourceType() + { + return $this->container['resourceType']; + } + + /** + * Sets resourceType + * + * @param string $resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return $this + */ + public function setResourceType($resourceType) + { + $this->container['resourceType'] = $resourceType; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListProjectTagsResponse.php b/Services/Smn/V2/Model/ListProjectTagsResponse.php new file mode 100755 index 0000000..63ba704 --- /dev/null +++ b/Services/Smn/V2/Model/ListProjectTagsResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Smn\V2\Model\ResourceTags[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $setters = [ + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $getters = [ + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tags + * 资源标签列表。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTags[]|null $tags 资源标签列表。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListResourceInstancesRequest.php b/Services/Smn/V2/Model/ListResourceInstancesRequest.php new file mode 100755 index 0000000..1f36c6e --- /dev/null +++ b/Services/Smn/V2/Model/ListResourceInstancesRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\ListInstanceRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceType' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceType' => 'resource_type', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'resourceType' => 'setResourceType', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'resourceType' => 'getResourceType', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceType'] = isset($data['resourceType']) ? $data['resourceType'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceType'] === null) { + $invalidProperties[] = "'resourceType' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceType + * 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return string + */ + public function getResourceType() + { + return $this->container['resourceType']; + } + + /** + * Sets resourceType + * + * @param string $resourceType 资源类型,目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return $this + */ + public function setResourceType($resourceType) + { + $this->container['resourceType'] = $resourceType; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\ListInstanceRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\ListInstanceRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListResourceInstancesResponse.php b/Services/Smn/V2/Model/ListResourceInstancesResponse.php new file mode 100755 index 0000000..8946329 --- /dev/null +++ b/Services/Smn/V2/Model/ListResourceInstancesResponse.php @@ -0,0 +1,301 @@ + '\G42Cloud\SDK\Smn\V2\Model\TagResource[]', + 'totalCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resources 返回的资源列表。 + * totalCount 总记录数。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resources' => null, + 'totalCount' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resources 返回的资源列表。 + * totalCount 总记录数。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resources' => 'resources', + 'totalCount' => 'total_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resources 返回的资源列表。 + * totalCount 总记录数。 + * + * @var string[] + */ + protected static $setters = [ + 'resources' => 'setResources', + 'totalCount' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resources 返回的资源列表。 + * totalCount 总记录数。 + * + * @var string[] + */ + protected static $getters = [ + 'resources' => 'getResources', + 'totalCount' => 'getTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resources'] = isset($data['resources']) ? $data['resources'] : null; + $this->container['totalCount'] = isset($data['totalCount']) ? $data['totalCount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resources + * 返回的资源列表。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\TagResource[]|null + */ + public function getResources() + { + return $this->container['resources']; + } + + /** + * Sets resources + * + * @param \G42Cloud\SDK\Smn\V2\Model\TagResource[]|null $resources 返回的资源列表。 + * + * @return $this + */ + public function setResources($resources) + { + $this->container['resources'] = $resources; + return $this; + } + + /** + * Gets totalCount + * 总记录数。 + * + * @return int|null + */ + public function getTotalCount() + { + return $this->container['totalCount']; + } + + /** + * Sets totalCount + * + * @param int|null $totalCount 总记录数。 + * + * @return $this + */ + public function setTotalCount($totalCount) + { + $this->container['totalCount'] = $totalCount; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListResourceTagsRequest.php b/Services/Smn/V2/Model/ListResourceTagsRequest.php new file mode 100755 index 0000000..5890578 --- /dev/null +++ b/Services/Smn/V2/Model/ListResourceTagsRequest.php @@ -0,0 +1,306 @@ + 'string', + 'resourceId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceType' => null, + 'resourceId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceType' => 'resource_type', + 'resourceId' => 'resource_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @var string[] + */ + protected static $setters = [ + 'resourceType' => 'setResourceType', + 'resourceId' => 'setResourceId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @var string[] + */ + protected static $getters = [ + 'resourceType' => 'getResourceType', + 'resourceId' => 'getResourceId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceType'] = isset($data['resourceType']) ? $data['resourceType'] : null; + $this->container['resourceId'] = isset($data['resourceId']) ? $data['resourceId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceType'] === null) { + $invalidProperties[] = "'resourceType' can't be null"; + } + if ($this->container['resourceId'] === null) { + $invalidProperties[] = "'resourceId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceType + * 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return string + */ + public function getResourceType() + { + return $this->container['resourceType']; + } + + /** + * Sets resourceType + * + * @param string $resourceType 资源类型 目前有: smn_topic,主题 smn_sms,短信 smn_application,移动推送 + * + * @return $this + */ + public function setResourceType($resourceType) + { + $this->container['resourceType'] = $resourceType; + return $this; + } + + /** + * Gets resourceId + * 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return string + */ + public function getResourceId() + { + return $this->container['resourceId']; + } + + /** + * Sets resourceId + * + * @param string $resourceId 资源ID。 获取resource_id的方法: 当resource_type为“smn_topic”时, 手动添加请求消息头“X-SMN-RESOURCEID-TYPE=name”,资源ID即为topic名称。 不添加请求消息头,通过“查询资源实例”,获取资源ID。 当resource_type为“smn_sms”时,resource_id为签名ID。您可在控制台获取。 + * + * @return $this + */ + public function setResourceId($resourceId) + { + $this->container['resourceId'] = $resourceId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListResourceTagsResponse.php b/Services/Smn/V2/Model/ListResourceTagsResponse.php new file mode 100755 index 0000000..5cd02f7 --- /dev/null +++ b/Services/Smn/V2/Model/ListResourceTagsResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Smn\V2\Model\ResourceTag[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $setters = [ + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * tags 资源标签列表。 + * + * @var string[] + */ + protected static $getters = [ + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets tags + * 资源标签列表。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTag[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTag[]|null $tags 资源标签列表。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListSubscriptionsByTopicRequest.php b/Services/Smn/V2/Model/ListSubscriptionsByTopicRequest.php new file mode 100755 index 0000000..d66a5aa --- /dev/null +++ b/Services/Smn/V2/Model/ListSubscriptionsByTopicRequest.php @@ -0,0 +1,338 @@ + 'string', + 'offset' => 'int', + 'limit' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'offset' => null, + 'limit' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'offset' => 'offset', + 'limit' => 'limit' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'offset' => 'setOffset', + 'limit' => 'setLimit' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'offset' => 'getOffset', + 'limit' => 'getLimit' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : 0; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 100; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets offset + * 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return int|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int|null $offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets limit + * 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListSubscriptionsByTopicResponse.php b/Services/Smn/V2/Model/ListSubscriptionsByTopicResponse.php new file mode 100755 index 0000000..71b78a3 --- /dev/null +++ b/Services/Smn/V2/Model/ListSubscriptionsByTopicResponse.php @@ -0,0 +1,336 @@ + 'string', + 'subscriptionCount' => 'int', + 'subscriptions' => '\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'subscriptionCount' => null, + 'subscriptions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'subscriptionCount' => 'subscription_count', + 'subscriptions' => 'subscriptions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'subscriptionCount' => 'setSubscriptionCount', + 'subscriptions' => 'setSubscriptions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'subscriptionCount' => 'getSubscriptionCount', + 'subscriptions' => 'getSubscriptions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['subscriptionCount'] = isset($data['subscriptionCount']) ? $data['subscriptionCount'] : null; + $this->container['subscriptions'] = isset($data['subscriptions']) ? $data['subscriptions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets subscriptionCount + * 订阅者个数。 + * + * @return int|null + */ + public function getSubscriptionCount() + { + return $this->container['subscriptionCount']; + } + + /** + * Sets subscriptionCount + * + * @param int|null $subscriptionCount 订阅者个数。 + * + * @return $this + */ + public function setSubscriptionCount($subscriptionCount) + { + $this->container['subscriptionCount'] = $subscriptionCount; + return $this; + } + + /** + * Gets subscriptions + * Subscription结构体。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsItem[]|null + */ + public function getSubscriptions() + { + return $this->container['subscriptions']; + } + + /** + * Sets subscriptions + * + * @param \G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsItem[]|null $subscriptions Subscription结构体。 + * + * @return $this + */ + public function setSubscriptions($subscriptions) + { + $this->container['subscriptions'] = $subscriptions; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListSubscriptionsItem.php b/Services/Smn/V2/Model/ListSubscriptionsItem.php new file mode 100755 index 0000000..0f42ce0 --- /dev/null +++ b/Services/Smn/V2/Model/ListSubscriptionsItem.php @@ -0,0 +1,496 @@ + 'string', + 'protocol' => 'string', + 'subscriptionUrn' => 'string', + 'owner' => 'string', + 'endpoint' => 'string', + 'remark' => 'string', + 'status' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识。 + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。目前支持的协议包括: \"default\": 默认协议。 “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 + * subscriptionUrn 订阅者的唯一资源标识。 + * owner Topic创建者的项目ID。 + * endpoint 接受消息的接入点。 + * remark 备注。 + * status 订阅者状态:0表示订阅还未确认,1表示已经确认,3表示已经取消确认。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'protocol' => null, + 'subscriptionUrn' => null, + 'owner' => null, + 'endpoint' => null, + 'remark' => null, + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识。 + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。目前支持的协议包括: \"default\": 默认协议。 “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 + * subscriptionUrn 订阅者的唯一资源标识。 + * owner Topic创建者的项目ID。 + * endpoint 接受消息的接入点。 + * remark 备注。 + * status 订阅者状态:0表示订阅还未确认,1表示已经确认,3表示已经取消确认。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'protocol' => 'protocol', + 'subscriptionUrn' => 'subscription_urn', + 'owner' => 'owner', + 'endpoint' => 'endpoint', + 'remark' => 'remark', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识。 + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。目前支持的协议包括: \"default\": 默认协议。 “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 + * subscriptionUrn 订阅者的唯一资源标识。 + * owner Topic创建者的项目ID。 + * endpoint 接受消息的接入点。 + * remark 备注。 + * status 订阅者状态:0表示订阅还未确认,1表示已经确认,3表示已经取消确认。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'protocol' => 'setProtocol', + 'subscriptionUrn' => 'setSubscriptionUrn', + 'owner' => 'setOwner', + 'endpoint' => 'setEndpoint', + 'remark' => 'setRemark', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识。 + * protocol 不同协议对应不同的endpoint(接受消息的接入点)。目前支持的协议包括: \"default\": 默认协议。 “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 + * subscriptionUrn 订阅者的唯一资源标识。 + * owner Topic创建者的项目ID。 + * endpoint 接受消息的接入点。 + * remark 备注。 + * status 订阅者状态:0表示订阅还未确认,1表示已经确认,3表示已经取消确认。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'protocol' => 'getProtocol', + 'subscriptionUrn' => 'getSubscriptionUrn', + 'owner' => 'getOwner', + 'endpoint' => 'getEndpoint', + 'remark' => 'getRemark', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['protocol'] = isset($data['protocol']) ? $data['protocol'] : null; + $this->container['subscriptionUrn'] = isset($data['subscriptionUrn']) ? $data['subscriptionUrn'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['endpoint'] = isset($data['endpoint']) ? $data['endpoint'] : null; + $this->container['remark'] = isset($data['remark']) ? $data['remark'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + if ($this->container['protocol'] === null) { + $invalidProperties[] = "'protocol' can't be null"; + } + if ($this->container['subscriptionUrn'] === null) { + $invalidProperties[] = "'subscriptionUrn' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + if ($this->container['endpoint'] === null) { + $invalidProperties[] = "'endpoint' can't be null"; + } + if ($this->container['remark'] === null) { + $invalidProperties[] = "'remark' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets protocol + * 不同协议对应不同的endpoint(接受消息的接入点)。目前支持的协议包括: \"default\": 默认协议。 “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 + * + * @return string + */ + public function getProtocol() + { + return $this->container['protocol']; + } + + /** + * Sets protocol + * + * @param string $protocol 不同协议对应不同的endpoint(接受消息的接入点)。目前支持的协议包括: \"default\": 默认协议。 “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 + * + * @return $this + */ + public function setProtocol($protocol) + { + $this->container['protocol'] = $protocol; + return $this; + } + + /** + * Gets subscriptionUrn + * 订阅者的唯一资源标识。 + * + * @return string + */ + public function getSubscriptionUrn() + { + return $this->container['subscriptionUrn']; + } + + /** + * Sets subscriptionUrn + * + * @param string $subscriptionUrn 订阅者的唯一资源标识。 + * + * @return $this + */ + public function setSubscriptionUrn($subscriptionUrn) + { + $this->container['subscriptionUrn'] = $subscriptionUrn; + return $this; + } + + /** + * Gets owner + * Topic创建者的项目ID。 + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner Topic创建者的项目ID。 + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + return $this; + } + + /** + * Gets endpoint + * 接受消息的接入点。 + * + * @return string + */ + public function getEndpoint() + { + return $this->container['endpoint']; + } + + /** + * Sets endpoint + * + * @param string $endpoint 接受消息的接入点。 + * + * @return $this + */ + public function setEndpoint($endpoint) + { + $this->container['endpoint'] = $endpoint; + return $this; + } + + /** + * Gets remark + * 备注。 + * + * @return string + */ + public function getRemark() + { + return $this->container['remark']; + } + + /** + * Sets remark + * + * @param string $remark 备注。 + * + * @return $this + */ + public function setRemark($remark) + { + $this->container['remark'] = $remark; + return $this; + } + + /** + * Gets status + * 订阅者状态:0表示订阅还未确认,1表示已经确认,3表示已经取消确认。 + * + * @return int + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int $status 订阅者状态:0表示订阅还未确认,1表示已经确认,3表示已经取消确认。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListSubscriptionsRequest.php b/Services/Smn/V2/Model/ListSubscriptionsRequest.php new file mode 100755 index 0000000..acff8a7 --- /dev/null +++ b/Services/Smn/V2/Model/ListSubscriptionsRequest.php @@ -0,0 +1,405 @@ + 'int', + 'limit' => 'int', + 'protocol' => 'string', + 'status' => 'int', + 'endpoint' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * protocol 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application。 + * status 状态。 0:未确认 1:已确认 2:不需要确认 3:已取消确认 4:已经删除。 + * endpoint 订阅终端。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'offset' => null, + 'limit' => null, + 'protocol' => null, + 'status' => null, + 'endpoint' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * protocol 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application。 + * status 状态。 0:未确认 1:已确认 2:不需要确认 3:已取消确认 4:已经删除。 + * endpoint 订阅终端。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'offset' => 'offset', + 'limit' => 'limit', + 'protocol' => 'protocol', + 'status' => 'status', + 'endpoint' => 'endpoint' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * protocol 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application。 + * status 状态。 0:未确认 1:已确认 2:不需要确认 3:已取消确认 4:已经删除。 + * endpoint 订阅终端。 + * + * @var string[] + */ + protected static $setters = [ + 'offset' => 'setOffset', + 'limit' => 'setLimit', + 'protocol' => 'setProtocol', + 'status' => 'setStatus', + 'endpoint' => 'setEndpoint' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * protocol 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application。 + * status 状态。 0:未确认 1:已确认 2:不需要确认 3:已取消确认 4:已经删除。 + * endpoint 订阅终端。 + * + * @var string[] + */ + protected static $getters = [ + 'offset' => 'getOffset', + 'limit' => 'getLimit', + 'protocol' => 'getProtocol', + 'status' => 'getStatus', + 'endpoint' => 'getEndpoint' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : 0; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 100; + $this->container['protocol'] = isset($data['protocol']) ? $data['protocol'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['endpoint'] = isset($data['endpoint']) ? $data['endpoint'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets offset + * 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return int|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int|null $offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets limit + * 查询数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 查询数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets protocol + * 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application。 + * + * @return string|null + */ + public function getProtocol() + { + return $this->container['protocol']; + } + + /** + * Sets protocol + * + * @param string|null $protocol 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application。 + * + * @return $this + */ + public function setProtocol($protocol) + { + $this->container['protocol'] = $protocol; + return $this; + } + + /** + * Gets status + * 状态。 0:未确认 1:已确认 2:不需要确认 3:已取消确认 4:已经删除。 + * + * @return int|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int|null $status 状态。 0:未确认 1:已确认 2:不需要确认 3:已取消确认 4:已经删除。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets endpoint + * 订阅终端。 + * + * @return string|null + */ + public function getEndpoint() + { + return $this->container['endpoint']; + } + + /** + * Sets endpoint + * + * @param string|null $endpoint 订阅终端。 + * + * @return $this + */ + public function setEndpoint($endpoint) + { + $this->container['endpoint'] = $endpoint; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListSubscriptionsResponse.php b/Services/Smn/V2/Model/ListSubscriptionsResponse.php new file mode 100755 index 0000000..6880d98 --- /dev/null +++ b/Services/Smn/V2/Model/ListSubscriptionsResponse.php @@ -0,0 +1,336 @@ + 'string', + 'subscriptionCount' => 'int', + 'subscriptions' => '\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'subscriptionCount' => null, + 'subscriptions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'subscriptionCount' => 'subscription_count', + 'subscriptions' => 'subscriptions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'subscriptionCount' => 'setSubscriptionCount', + 'subscriptions' => 'setSubscriptions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * subscriptionCount 订阅者个数。 + * subscriptions Subscription结构体。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'subscriptionCount' => 'getSubscriptionCount', + 'subscriptions' => 'getSubscriptions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['subscriptionCount'] = isset($data['subscriptionCount']) ? $data['subscriptionCount'] : null; + $this->container['subscriptions'] = isset($data['subscriptions']) ? $data['subscriptions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets subscriptionCount + * 订阅者个数。 + * + * @return int|null + */ + public function getSubscriptionCount() + { + return $this->container['subscriptionCount']; + } + + /** + * Sets subscriptionCount + * + * @param int|null $subscriptionCount 订阅者个数。 + * + * @return $this + */ + public function setSubscriptionCount($subscriptionCount) + { + $this->container['subscriptionCount'] = $subscriptionCount; + return $this; + } + + /** + * Gets subscriptions + * Subscription结构体。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsItem[]|null + */ + public function getSubscriptions() + { + return $this->container['subscriptions']; + } + + /** + * Sets subscriptions + * + * @param \G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsItem[]|null $subscriptions Subscription结构体。 + * + * @return $this + */ + public function setSubscriptions($subscriptions) + { + $this->container['subscriptions'] = $subscriptions; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListTopicAttributesRequest.php b/Services/Smn/V2/Model/ListTopicAttributesRequest.php new file mode 100755 index 0000000..f226864 --- /dev/null +++ b/Services/Smn/V2/Model/ListTopicAttributesRequest.php @@ -0,0 +1,306 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets name + * 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListTopicAttributesResponse.php b/Services/Smn/V2/Model/ListTopicAttributesResponse.php new file mode 100755 index 0000000..8ef566e --- /dev/null +++ b/Services/Smn/V2/Model/ListTopicAttributesResponse.php @@ -0,0 +1,301 @@ + 'string', + 'attributes' => '\G42Cloud\SDK\Smn\V2\Model\TopicAttribute' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * attributes attributes + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets attributes + * attributes + * + * @return \G42Cloud\SDK\Smn\V2\Model\TopicAttribute|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \G42Cloud\SDK\Smn\V2\Model\TopicAttribute|null $attributes attributes + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListTopicDetailsRequest.php b/Services/Smn/V2/Model/ListTopicDetailsRequest.php new file mode 100755 index 0000000..036062a --- /dev/null +++ b/Services/Smn/V2/Model/ListTopicDetailsRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListTopicDetailsResponse.php b/Services/Smn/V2/Model/ListTopicDetailsResponse.php new file mode 100755 index 0000000..fbac51c --- /dev/null +++ b/Services/Smn/V2/Model/ListTopicDetailsResponse.php @@ -0,0 +1,511 @@ + 'string', + 'pushPolicy' => 'int', + 'createTime' => 'string', + 'name' => 'string', + 'topicUrn' => 'string', + 'displayName' => 'string', + 'requestId' => 'string', + 'enterpriseProjectId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * updateTime 更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * pushPolicy 消息推送的策略。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * createTime 创建时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * name 创建Topic的名字。 + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表获](https://support.huaweicloud.com/api-smn/smn_api_51004.html)取该标识。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * requestId 请求的唯一标识ID。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'updateTime' => null, + 'pushPolicy' => null, + 'createTime' => null, + 'name' => null, + 'topicUrn' => null, + 'displayName' => null, + 'requestId' => null, + 'enterpriseProjectId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * updateTime 更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * pushPolicy 消息推送的策略。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * createTime 创建时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * name 创建Topic的名字。 + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表获](https://support.huaweicloud.com/api-smn/smn_api_51004.html)取该标识。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * requestId 请求的唯一标识ID。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'updateTime' => 'update_time', + 'pushPolicy' => 'push_policy', + 'createTime' => 'create_time', + 'name' => 'name', + 'topicUrn' => 'topic_urn', + 'displayName' => 'display_name', + 'requestId' => 'request_id', + 'enterpriseProjectId' => 'enterprise_project_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * updateTime 更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * pushPolicy 消息推送的策略。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * createTime 创建时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * name 创建Topic的名字。 + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表获](https://support.huaweicloud.com/api-smn/smn_api_51004.html)取该标识。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * requestId 请求的唯一标识ID。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $setters = [ + 'updateTime' => 'setUpdateTime', + 'pushPolicy' => 'setPushPolicy', + 'createTime' => 'setCreateTime', + 'name' => 'setName', + 'topicUrn' => 'setTopicUrn', + 'displayName' => 'setDisplayName', + 'requestId' => 'setRequestId', + 'enterpriseProjectId' => 'setEnterpriseProjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * updateTime 更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * pushPolicy 消息推送的策略。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * createTime 创建时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * name 创建Topic的名字。 + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表获](https://support.huaweicloud.com/api-smn/smn_api_51004.html)取该标识。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * requestId 请求的唯一标识ID。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $getters = [ + 'updateTime' => 'getUpdateTime', + 'pushPolicy' => 'getPushPolicy', + 'createTime' => 'getCreateTime', + 'name' => 'getName', + 'topicUrn' => 'getTopicUrn', + 'displayName' => 'getDisplayName', + 'requestId' => 'getRequestId', + 'enterpriseProjectId' => 'getEnterpriseProjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['updateTime'] = isset($data['updateTime']) ? $data['updateTime'] : null; + $this->container['pushPolicy'] = isset($data['pushPolicy']) ? $data['pushPolicy'] : null; + $this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['displayName'] = isset($data['displayName']) ? $data['displayName'] : null; + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets updateTime + * 更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string|null + */ + public function getUpdateTime() + { + return $this->container['updateTime']; + } + + /** + * Sets updateTime + * + * @param string|null $updateTime 更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setUpdateTime($updateTime) + { + $this->container['updateTime'] = $updateTime; + return $this; + } + + /** + * Gets pushPolicy + * 消息推送的策略。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * + * @return int|null + */ + public function getPushPolicy() + { + return $this->container['pushPolicy']; + } + + /** + * Sets pushPolicy + * + * @param int|null $pushPolicy 消息推送的策略。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * + * @return $this + */ + public function setPushPolicy($pushPolicy) + { + $this->container['pushPolicy'] = $pushPolicy; + return $this; + } + + /** + * Gets createTime + * 创建时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string|null + */ + public function getCreateTime() + { + return $this->container['createTime']; + } + + /** + * Sets createTime + * + * @param string|null $createTime 创建时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setCreateTime($createTime) + { + $this->container['createTime'] = $createTime; + return $this; + } + + /** + * Gets name + * 创建Topic的名字。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 创建Topic的名字。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识。可以通过[查看主题列表获](https://support.huaweicloud.com/api-smn/smn_api_51004.html)取该标识。 + * + * @return string|null + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string|null $topicUrn Topic的唯一的资源标识。可以通过[查看主题列表获](https://support.huaweicloud.com/api-smn/smn_api_51004.html)取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets displayName + * Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * + * @return string|null + */ + public function getDisplayName() + { + return $this->container['displayName']; + } + + /** + * Sets displayName + * + * @param string|null $displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * + * @return $this + */ + public function setDisplayName($displayName) + { + $this->container['displayName'] = $displayName; + return $this; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets enterpriseProjectId + * 企业项目ID。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 企业项目ID。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListTopicsItem.php b/Services/Smn/V2/Model/ListTopicsItem.php new file mode 100755 index 0000000..17f8f4c --- /dev/null +++ b/Services/Smn/V2/Model/ListTopicsItem.php @@ -0,0 +1,420 @@ + 'string', + 'name' => 'string', + 'displayName' => 'string', + 'pushPolicy' => 'int', + 'enterpriseProjectId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识。 + * name 创建topic的名字。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * pushPolicy 消息推送的策略,该属性目前不支持修改,后续将支持修改。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'name' => null, + 'displayName' => null, + 'pushPolicy' => null, + 'enterpriseProjectId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识。 + * name 创建topic的名字。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * pushPolicy 消息推送的策略,该属性目前不支持修改,后续将支持修改。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'name' => 'name', + 'displayName' => 'display_name', + 'pushPolicy' => 'push_policy', + 'enterpriseProjectId' => 'enterprise_project_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识。 + * name 创建topic的名字。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * pushPolicy 消息推送的策略,该属性目前不支持修改,后续将支持修改。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'name' => 'setName', + 'displayName' => 'setDisplayName', + 'pushPolicy' => 'setPushPolicy', + 'enterpriseProjectId' => 'setEnterpriseProjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识。 + * name 创建topic的名字。 + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * pushPolicy 消息推送的策略,该属性目前不支持修改,后续将支持修改。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * enterpriseProjectId 企业项目ID。 + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'name' => 'getName', + 'displayName' => 'getDisplayName', + 'pushPolicy' => 'getPushPolicy', + 'enterpriseProjectId' => 'getEnterpriseProjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['displayName'] = isset($data['displayName']) ? $data['displayName'] : null; + $this->container['pushPolicy'] = isset($data['pushPolicy']) ? $data['pushPolicy'] : null; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['displayName'] === null) { + $invalidProperties[] = "'displayName' can't be null"; + } + if ($this->container['pushPolicy'] === null) { + $invalidProperties[] = "'pushPolicy' can't be null"; + } + if ($this->container['enterpriseProjectId'] === null) { + $invalidProperties[] = "'enterpriseProjectId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets name + * 创建topic的名字。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 创建topic的名字。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets displayName + * Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * + * @return string + */ + public function getDisplayName() + { + return $this->container['displayName']; + } + + /** + * Sets displayName + * + * @param string $displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。 + * + * @return $this + */ + public function setDisplayName($displayName) + { + $this->container['displayName'] = $displayName; + return $this; + } + + /** + * Gets pushPolicy + * 消息推送的策略,该属性目前不支持修改,后续将支持修改。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * + * @return int + */ + public function getPushPolicy() + { + return $this->container['pushPolicy']; + } + + /** + * Sets pushPolicy + * + * @param int $pushPolicy 消息推送的策略,该属性目前不支持修改,后续将支持修改。0表示发送失败,保留到失败队列,1表示直接丢弃发送失败的消息。 + * + * @return $this + */ + public function setPushPolicy($pushPolicy) + { + $this->container['pushPolicy'] = $pushPolicy; + return $this; + } + + /** + * Gets enterpriseProjectId + * 企业项目ID。 + * + * @return string + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string $enterpriseProjectId 企业项目ID。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListTopicsRequest.php b/Services/Smn/V2/Model/ListTopicsRequest.php new file mode 100755 index 0000000..097730f --- /dev/null +++ b/Services/Smn/V2/Model/ListTopicsRequest.php @@ -0,0 +1,405 @@ + 'int', + 'limit' => 'int', + 'enterpriseProjectId' => 'string', + 'name' => 'string', + 'fuzzyName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enterpriseProjectId 企业项目id,默认企业项目id为0。 + * name 检索的主题名称,完全匹配。 + * fuzzyName 检索的主题名称,模糊匹配,按照startwith模式进行匹配。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'offset' => null, + 'limit' => null, + 'enterpriseProjectId' => null, + 'name' => null, + 'fuzzyName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enterpriseProjectId 企业项目id,默认企业项目id为0。 + * name 检索的主题名称,完全匹配。 + * fuzzyName 检索的主题名称,模糊匹配,按照startwith模式进行匹配。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'offset' => 'offset', + 'limit' => 'limit', + 'enterpriseProjectId' => 'enterprise_project_id', + 'name' => 'name', + 'fuzzyName' => 'fuzzy_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enterpriseProjectId 企业项目id,默认企业项目id为0。 + * name 检索的主题名称,完全匹配。 + * fuzzyName 检索的主题名称,模糊匹配,按照startwith模式进行匹配。 + * + * @var string[] + */ + protected static $setters = [ + 'offset' => 'setOffset', + 'limit' => 'setLimit', + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'name' => 'setName', + 'fuzzyName' => 'setFuzzyName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * enterpriseProjectId 企业项目id,默认企业项目id为0。 + * name 检索的主题名称,完全匹配。 + * fuzzyName 检索的主题名称,模糊匹配,按照startwith模式进行匹配。 + * + * @var string[] + */ + protected static $getters = [ + 'offset' => 'getOffset', + 'limit' => 'getLimit', + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'name' => 'getName', + 'fuzzyName' => 'getFuzzyName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['offset'] = isset($data['offset']) ? $data['offset'] : 0; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : 100; + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : '0'; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['fuzzyName'] = isset($data['fuzzyName']) ? $data['fuzzyName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets offset + * 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return int|null + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int|null $offset 偏移量。 偏移量为一个大于0小于资源总个数的整数,表示查询该偏移量后面的所有的资源,默认值为0。 + * + * @return $this + */ + public function setOffset($offset) + { + $this->container['offset'] = $offset; + return $this; + } + + /** + * Gets limit + * 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit 查询的数量限制。 取值范围:1~100,取值一般为10,20,50。功能说明:每页返回的资源个数。默认值为100。 + * + * @return $this + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + return $this; + } + + /** + * Gets enterpriseProjectId + * 企业项目id,默认企业项目id为0。 + * + * @return string|null + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string|null $enterpriseProjectId 企业项目id,默认企业项目id为0。 + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets name + * 检索的主题名称,完全匹配。 + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name 检索的主题名称,完全匹配。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets fuzzyName + * 检索的主题名称,模糊匹配,按照startwith模式进行匹配。 + * + * @return string|null + */ + public function getFuzzyName() + { + return $this->container['fuzzyName']; + } + + /** + * Sets fuzzyName + * + * @param string|null $fuzzyName 检索的主题名称,模糊匹配,按照startwith模式进行匹配。 + * + * @return $this + */ + public function setFuzzyName($fuzzyName) + { + $this->container['fuzzyName'] = $fuzzyName; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListTopicsResponse.php b/Services/Smn/V2/Model/ListTopicsResponse.php new file mode 100755 index 0000000..f67a9e4 --- /dev/null +++ b/Services/Smn/V2/Model/ListTopicsResponse.php @@ -0,0 +1,336 @@ + 'string', + 'topicCount' => 'int', + 'topics' => '\G42Cloud\SDK\Smn\V2\Model\ListTopicsItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * topicCount 返回的Topic个数。该参数不受offset和limit影响,即返回的是您账户下所有的Topic个数。 + * topics Topic结构体数组。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'topicCount' => null, + 'topics' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * topicCount 返回的Topic个数。该参数不受offset和limit影响,即返回的是您账户下所有的Topic个数。 + * topics Topic结构体数组。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'topicCount' => 'topic_count', + 'topics' => 'topics' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * topicCount 返回的Topic个数。该参数不受offset和limit影响,即返回的是您账户下所有的Topic个数。 + * topics Topic结构体数组。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'topicCount' => 'setTopicCount', + 'topics' => 'setTopics' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * topicCount 返回的Topic个数。该参数不受offset和limit影响,即返回的是您账户下所有的Topic个数。 + * topics Topic结构体数组。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'topicCount' => 'getTopicCount', + 'topics' => 'getTopics' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['topicCount'] = isset($data['topicCount']) ? $data['topicCount'] : null; + $this->container['topics'] = isset($data['topics']) ? $data['topics'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets topicCount + * 返回的Topic个数。该参数不受offset和limit影响,即返回的是您账户下所有的Topic个数。 + * + * @return int|null + */ + public function getTopicCount() + { + return $this->container['topicCount']; + } + + /** + * Sets topicCount + * + * @param int|null $topicCount 返回的Topic个数。该参数不受offset和limit影响,即返回的是您账户下所有的Topic个数。 + * + * @return $this + */ + public function setTopicCount($topicCount) + { + $this->container['topicCount'] = $topicCount; + return $this; + } + + /** + * Gets topics + * Topic结构体数组。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ListTopicsItem[]|null + */ + public function getTopics() + { + return $this->container['topics']; + } + + /** + * Sets topics + * + * @param \G42Cloud\SDK\Smn\V2\Model\ListTopicsItem[]|null $topics Topic结构体数组。 + * + * @return $this + */ + public function setTopics($topics) + { + $this->container['topics'] = $topics; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListVersionRequest.php b/Services/Smn/V2/Model/ListVersionRequest.php new file mode 100755 index 0000000..6c76f9d --- /dev/null +++ b/Services/Smn/V2/Model/ListVersionRequest.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * apiVersion 待查询版本号。当前仅支持v2。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'apiVersion' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * apiVersion 待查询版本号。当前仅支持v2。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'apiVersion' => 'api_version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * apiVersion 待查询版本号。当前仅支持v2。 + * + * @var string[] + */ + protected static $setters = [ + 'apiVersion' => 'setApiVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * apiVersion 待查询版本号。当前仅支持v2。 + * + * @var string[] + */ + protected static $getters = [ + 'apiVersion' => 'getApiVersion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['apiVersion'] = isset($data['apiVersion']) ? $data['apiVersion'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['apiVersion'] === null) { + $invalidProperties[] = "'apiVersion' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets apiVersion + * 待查询版本号。当前仅支持v2。 + * + * @return string + */ + public function getApiVersion() + { + return $this->container['apiVersion']; + } + + /** + * Sets apiVersion + * + * @param string $apiVersion 待查询版本号。当前仅支持v2。 + * + * @return $this + */ + public function setApiVersion($apiVersion) + { + $this->container['apiVersion'] = $apiVersion; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListVersionResponse.php b/Services/Smn/V2/Model/ListVersionResponse.php new file mode 100755 index 0000000..8451a8e --- /dev/null +++ b/Services/Smn/V2/Model/ListVersionResponse.php @@ -0,0 +1,266 @@ + 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * version version + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'version' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * version version + * + * @var string[] + */ + protected static $attributeMap = [ + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * version version + * + * @var string[] + */ + protected static $setters = [ + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * version version + * + * @var string[] + */ + protected static $getters = [ + 'version' => 'getVersion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['version'] = isset($data['version']) ? $data['version'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets version + * version + * + * @return object|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param object|null $version version + * + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListVersionsRequest.php b/Services/Smn/V2/Model/ListVersionsRequest.php new file mode 100755 index 0000000..104db61 --- /dev/null +++ b/Services/Smn/V2/Model/ListVersionsRequest.php @@ -0,0 +1,235 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ListVersionsResponse.php b/Services/Smn/V2/Model/ListVersionsResponse.php new file mode 100755 index 0000000..464075e --- /dev/null +++ b/Services/Smn/V2/Model/ListVersionsResponse.php @@ -0,0 +1,266 @@ + '\G42Cloud\SDK\Smn\V2\Model\VersionItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * versions 描述version相关对象的列表。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'versions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * versions 描述version相关对象的列表。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'versions' => 'versions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * versions 描述version相关对象的列表。 + * + * @var string[] + */ + protected static $setters = [ + 'versions' => 'setVersions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * versions 描述version相关对象的列表。 + * + * @var string[] + */ + protected static $getters = [ + 'versions' => 'getVersions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['versions'] = isset($data['versions']) ? $data['versions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets versions + * 描述version相关对象的列表。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\VersionItem[]|null + */ + public function getVersions() + { + return $this->container['versions']; + } + + /** + * Sets versions + * + * @param \G42Cloud\SDK\Smn\V2\Model\VersionItem[]|null $versions 描述version相关对象的列表。 + * + * @return $this + */ + public function setVersions($versions) + { + $this->container['versions'] = $versions; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/MessageTemplate.php b/Services/Smn/V2/Model/MessageTemplate.php new file mode 100755 index 0000000..6a582ae --- /dev/null +++ b/Services/Smn/V2/Model/MessageTemplate.php @@ -0,0 +1,458 @@ + 'string', + 'messageTemplateName' => 'string', + 'protocol' => 'string', + 'tagNames' => 'string[]', + 'createTime' => 'string', + 'updateTime' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表 + * createTime 模板创建时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'messageTemplateId' => null, + 'messageTemplateName' => null, + 'protocol' => null, + 'tagNames' => null, + 'createTime' => null, + 'updateTime' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表 + * createTime 模板创建时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageTemplateId' => 'message_template_id', + 'messageTemplateName' => 'message_template_name', + 'protocol' => 'protocol', + 'tagNames' => 'tag_names', + 'createTime' => 'create_time', + 'updateTime' => 'update_time' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表 + * createTime 模板创建时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $setters = [ + 'messageTemplateId' => 'setMessageTemplateId', + 'messageTemplateName' => 'setMessageTemplateName', + 'protocol' => 'setProtocol', + 'tagNames' => 'setTagNames', + 'createTime' => 'setCreateTime', + 'updateTime' => 'setUpdateTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * messageTemplateId 模板ID。 + * messageTemplateName 模板名称。 + * protocol 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * tagNames 模板tag列表 + * createTime 模板创建时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * updateTime 模板最后更新时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @var string[] + */ + protected static $getters = [ + 'messageTemplateId' => 'getMessageTemplateId', + 'messageTemplateName' => 'getMessageTemplateName', + 'protocol' => 'getProtocol', + 'tagNames' => 'getTagNames', + 'createTime' => 'getCreateTime', + 'updateTime' => 'getUpdateTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageTemplateId'] = isset($data['messageTemplateId']) ? $data['messageTemplateId'] : null; + $this->container['messageTemplateName'] = isset($data['messageTemplateName']) ? $data['messageTemplateName'] : null; + $this->container['protocol'] = isset($data['protocol']) ? $data['protocol'] : null; + $this->container['tagNames'] = isset($data['tagNames']) ? $data['tagNames'] : null; + $this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null; + $this->container['updateTime'] = isset($data['updateTime']) ? $data['updateTime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['messageTemplateId'] === null) { + $invalidProperties[] = "'messageTemplateId' can't be null"; + } + if ($this->container['messageTemplateName'] === null) { + $invalidProperties[] = "'messageTemplateName' can't be null"; + } + if ($this->container['protocol'] === null) { + $invalidProperties[] = "'protocol' can't be null"; + } + if ($this->container['tagNames'] === null) { + $invalidProperties[] = "'tagNames' can't be null"; + } + if ($this->container['createTime'] === null) { + $invalidProperties[] = "'createTime' can't be null"; + } + if ($this->container['updateTime'] === null) { + $invalidProperties[] = "'updateTime' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets messageTemplateId + * 模板ID。 + * + * @return string + */ + public function getMessageTemplateId() + { + return $this->container['messageTemplateId']; + } + + /** + * Sets messageTemplateId + * + * @param string $messageTemplateId 模板ID。 + * + * @return $this + */ + public function setMessageTemplateId($messageTemplateId) + { + $this->container['messageTemplateId'] = $messageTemplateId; + return $this; + } + + /** + * Gets messageTemplateName + * 模板名称。 + * + * @return string + */ + public function getMessageTemplateName() + { + return $this->container['messageTemplateName']; + } + + /** + * Sets messageTemplateName + * + * @param string $messageTemplateName 模板名称。 + * + * @return $this + */ + public function setMessageTemplateName($messageTemplateName) + { + $this->container['messageTemplateName'] = $messageTemplateName; + return $this; + } + + /** + * Gets protocol + * 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return string + */ + public function getProtocol() + { + return $this->container['protocol']; + } + + /** + * Sets protocol + * + * @param string $protocol 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + * + * @return $this + */ + public function setProtocol($protocol) + { + $this->container['protocol'] = $protocol; + return $this; + } + + /** + * Gets tagNames + * 模板tag列表 + * + * @return string[] + */ + public function getTagNames() + { + return $this->container['tagNames']; + } + + /** + * Sets tagNames + * + * @param string[] $tagNames 模板tag列表 + * + * @return $this + */ + public function setTagNames($tagNames) + { + $this->container['tagNames'] = $tagNames; + return $this; + } + + /** + * Gets createTime + * 模板创建时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string + */ + public function getCreateTime() + { + return $this->container['createTime']; + } + + /** + * Sets createTime + * + * @param string $createTime 模板创建时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setCreateTime($createTime) + { + $this->container['createTime'] = $createTime; + return $this; + } + + /** + * Gets updateTime + * 模板最后更新时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return string + */ + public function getUpdateTime() + { + return $this->container['updateTime']; + } + + /** + * Sets updateTime + * + * @param string $updateTime 模板最后更新时间 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 + * + * @return $this + */ + public function setUpdateTime($updateTime) + { + $this->container['updateTime'] = $updateTime; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/PublishAppMessageRequest.php b/Services/Smn/V2/Model/PublishAppMessageRequest.php new file mode 100755 index 0000000..393a66a --- /dev/null +++ b/Services/Smn/V2/Model/PublishAppMessageRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\PublishAppMessageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'endpointUrn' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'endpointUrn' => 'endpoint_urn', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'endpointUrn' => 'setEndpointUrn', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'endpointUrn' => 'getEndpointUrn', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['endpointUrn'] = isset($data['endpointUrn']) ? $data['endpointUrn'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['endpointUrn'] === null) { + $invalidProperties[] = "'endpointUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets endpointUrn + * Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识 + * + * @return string + */ + public function getEndpointUrn() + { + return $this->container['endpointUrn']; + } + + /** + * Sets endpointUrn + * + * @param string $endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识 + * + * @return $this + */ + public function setEndpointUrn($endpointUrn) + { + $this->container['endpointUrn'] = $endpointUrn; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\PublishAppMessageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\PublishAppMessageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/PublishAppMessageRequestBody.php b/Services/Smn/V2/Model/PublishAppMessageRequestBody.php new file mode 100755 index 0000000..b98261c --- /dev/null +++ b/Services/Smn/V2/Model/PublishAppMessageRequestBody.php @@ -0,0 +1,335 @@ + 'string', + 'messageStructure' => 'string', + 'timeToLive' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * message message与message_structure二者选其一。 message, App消息发布。 message_structure, 使用消息结构体方式的App消息发布。 app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageStructure app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } } 华为系统通知栏消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } } 苹果平台消息格式 { \"APNS\": { \"aps\": { \"alert\": \"hello world\" } } } + * timeToLive 消息发送的生存时间,是相对于发布时间的。 SMN系统将移动推送消息转交给推送平台前,会计算该消息在系统消耗的时间。只有消耗的时间小于time_to_live时,SMN才会将消息转交给推送平台,并将time_to_live减去消耗的时间传递给推送平台,否则消息废弃。 time _to_live的单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'message' => null, + 'messageStructure' => null, + 'timeToLive' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * message message与message_structure二者选其一。 message, App消息发布。 message_structure, 使用消息结构体方式的App消息发布。 app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageStructure app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } } 华为系统通知栏消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } } 苹果平台消息格式 { \"APNS\": { \"aps\": { \"alert\": \"hello world\" } } } + * timeToLive 消息发送的生存时间,是相对于发布时间的。 SMN系统将移动推送消息转交给推送平台前,会计算该消息在系统消耗的时间。只有消耗的时间小于time_to_live时,SMN才会将消息转交给推送平台,并将time_to_live减去消耗的时间传递给推送平台,否则消息废弃。 time _to_live的单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message', + 'messageStructure' => 'message_structure', + 'timeToLive' => 'time_to_live' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * message message与message_structure二者选其一。 message, App消息发布。 message_structure, 使用消息结构体方式的App消息发布。 app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageStructure app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } } 华为系统通知栏消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } } 苹果平台消息格式 { \"APNS\": { \"aps\": { \"alert\": \"hello world\" } } } + * timeToLive 消息发送的生存时间,是相对于发布时间的。 SMN系统将移动推送消息转交给推送平台前,会计算该消息在系统消耗的时间。只有消耗的时间小于time_to_live时,SMN才会将消息转交给推送平台,并将time_to_live减去消耗的时间传递给推送平台,否则消息废弃。 time _to_live的单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage', + 'messageStructure' => 'setMessageStructure', + 'timeToLive' => 'setTimeToLive' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * message message与message_structure二者选其一。 message, App消息发布。 message_structure, 使用消息结构体方式的App消息发布。 app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageStructure app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } } 华为系统通知栏消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } } 苹果平台消息格式 { \"APNS\": { \"aps\": { \"alert\": \"hello world\" } } } + * timeToLive 消息发送的生存时间,是相对于发布时间的。 SMN系统将移动推送消息转交给推送平台前,会计算该消息在系统消耗的时间。只有消耗的时间小于time_to_live时,SMN才会将消息转交给推送平台,并将time_to_live减去消耗的时间传递给推送平台,否则消息废弃。 time _to_live的单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage', + 'messageStructure' => 'getMessageStructure', + 'timeToLive' => 'getTimeToLive' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['messageStructure'] = isset($data['messageStructure']) ? $data['messageStructure'] : null; + $this->container['timeToLive'] = isset($data['timeToLive']) ? $data['timeToLive'] : '3600'; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * message与message_structure二者选其一。 message, App消息发布。 message_structure, 使用消息结构体方式的App消息发布。 app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message与message_structure二者选其一。 message, App消息发布。 message_structure, 使用消息结构体方式的App消息发布。 app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + return $this; + } + + /** + * Gets messageStructure + * app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } } 华为系统通知栏消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } } 苹果平台消息格式 { \"APNS\": { \"aps\": { \"alert\": \"hello world\" } } } + * + * @return string|null + */ + public function getMessageStructure() + { + return $this->container['messageStructure']; + } + + /** + * Sets messageStructure + * + * @param string|null $messageStructure app推送的消息内容,当前支持的推送平台有HMS、APNS、APNS_SANDBOX。 HMS是为开发者提供的消息推送平台。 APNS和APNS_SANDBOX是用于推送iOS消息的服务平台。 HMS平台指定的消息内容不超过2K。 APNS和APNS_SANDBOX平台的消息内容不能超过4K。 推送平台的消息内容格式要求详情见application消息体格式。 华为透传消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } } 华为系统通知栏消息 { \"HMS\": { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } } 苹果平台消息格式 { \"APNS\": { \"aps\": { \"alert\": \"hello world\" } } } + * + * @return $this + */ + public function setMessageStructure($messageStructure) + { + $this->container['messageStructure'] = $messageStructure; + return $this; + } + + /** + * Gets timeToLive + * 消息发送的生存时间,是相对于发布时间的。 SMN系统将移动推送消息转交给推送平台前,会计算该消息在系统消耗的时间。只有消耗的时间小于time_to_live时,SMN才会将消息转交给推送平台,并将time_to_live减去消耗的时间传递给推送平台,否则消息废弃。 time _to_live的单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @return string|null + */ + public function getTimeToLive() + { + return $this->container['timeToLive']; + } + + /** + * Sets timeToLive + * + * @param string|null $timeToLive 消息发送的生存时间,是相对于发布时间的。 SMN系统将移动推送消息转交给推送平台前,会计算该消息在系统消耗的时间。只有消耗的时间小于time_to_live时,SMN才会将消息转交给推送平台,并将time_to_live减去消耗的时间传递给推送平台,否则消息废弃。 time _to_live的单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @return $this + */ + public function setTimeToLive($timeToLive) + { + $this->container['timeToLive'] = $timeToLive; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/PublishAppMessageResponse.php b/Services/Smn/V2/Model/PublishAppMessageResponse.php new file mode 100755 index 0000000..42ac75e --- /dev/null +++ b/Services/Smn/V2/Model/PublishAppMessageResponse.php @@ -0,0 +1,301 @@ + 'string', + 'requestId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * messageId 唯一的消息ID。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'messageId' => null, + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * messageId 唯一的消息ID。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageId' => 'message_id', + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * messageId 唯一的消息ID。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'messageId' => 'setMessageId', + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * messageId 唯一的消息ID。 + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'messageId' => 'getMessageId', + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets messageId + * 唯一的消息ID。 + * + * @return string|null + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string|null $messageId 唯一的消息ID。 + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + return $this; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/PublishMessageRequest.php b/Services/Smn/V2/Model/PublishMessageRequest.php new file mode 100755 index 0000000..faa9d93 --- /dev/null +++ b/Services/Smn/V2/Model/PublishMessageRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\PublishMessageRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\PublishMessageRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\PublishMessageRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/PublishMessageRequestBody.php b/Services/Smn/V2/Model/PublishMessageRequestBody.php new file mode 100755 index 0000000..b266617 --- /dev/null +++ b/Services/Smn/V2/Model/PublishMessageRequestBody.php @@ -0,0 +1,440 @@ + message_template_name > message。 + * messageStructure Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functionstage”、“HMS”、“APNS”以及“APNS_SANDBOX”。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageTemplateName 消息模板名称,可通过[查询消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * tags tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 + * timeToLive 指消息在SMN系统内部的最长存留时间。超过该存留时间,系统将不再发送该消息。单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $openAPITypes = [ + 'subject' => 'string', + 'message' => 'string', + 'messageStructure' => 'string', + 'messageTemplateName' => 'string', + 'tags' => 'map[string,string]', + 'timeToLive' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * subject 消息标题,给邮箱订阅者发送邮件时作为邮件主题,长度不能超过512个字节。 + * message 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,长度不超过490个字符,超出部分系统自动截断。短信内容不能包含“[]”或者“【】”符号。 对于移动推送订阅者推送消息,message消息必须符合移动推送平台的消息格式,消息格式请参见application消息体格式。否则移动app无法收到消息,目前支持的平台有HMS、APNS、APNS_SANDBOX。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * messageStructure Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functionstage”、“HMS”、“APNS”以及“APNS_SANDBOX”。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageTemplateName 消息模板名称,可通过[查询消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * tags tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 + * timeToLive 指消息在SMN系统内部的最长存留时间。超过该存留时间,系统将不再发送该消息。单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'subject' => null, + 'message' => null, + 'messageStructure' => null, + 'messageTemplateName' => null, + 'tags' => null, + 'timeToLive' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * subject 消息标题,给邮箱订阅者发送邮件时作为邮件主题,长度不能超过512个字节。 + * message 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,长度不超过490个字符,超出部分系统自动截断。短信内容不能包含“[]”或者“【】”符号。 对于移动推送订阅者推送消息,message消息必须符合移动推送平台的消息格式,消息格式请参见application消息体格式。否则移动app无法收到消息,目前支持的平台有HMS、APNS、APNS_SANDBOX。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * messageStructure Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functionstage”、“HMS”、“APNS”以及“APNS_SANDBOX”。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageTemplateName 消息模板名称,可通过[查询消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * tags tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 + * timeToLive 指消息在SMN系统内部的最长存留时间。超过该存留时间,系统将不再发送该消息。单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'subject' => 'subject', + 'message' => 'message', + 'messageStructure' => 'message_structure', + 'messageTemplateName' => 'message_template_name', + 'tags' => 'tags', + 'timeToLive' => 'time_to_live' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * subject 消息标题,给邮箱订阅者发送邮件时作为邮件主题,长度不能超过512个字节。 + * message 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,长度不超过490个字符,超出部分系统自动截断。短信内容不能包含“[]”或者“【】”符号。 对于移动推送订阅者推送消息,message消息必须符合移动推送平台的消息格式,消息格式请参见application消息体格式。否则移动app无法收到消息,目前支持的平台有HMS、APNS、APNS_SANDBOX。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * messageStructure Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functionstage”、“HMS”、“APNS”以及“APNS_SANDBOX”。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageTemplateName 消息模板名称,可通过[查询消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * tags tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 + * timeToLive 指消息在SMN系统内部的最长存留时间。超过该存留时间,系统将不再发送该消息。单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $setters = [ + 'subject' => 'setSubject', + 'message' => 'setMessage', + 'messageStructure' => 'setMessageStructure', + 'messageTemplateName' => 'setMessageTemplateName', + 'tags' => 'setTags', + 'timeToLive' => 'setTimeToLive' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * subject 消息标题,给邮箱订阅者发送邮件时作为邮件主题,长度不能超过512个字节。 + * message 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,长度不超过490个字符,超出部分系统自动截断。短信内容不能包含“[]”或者“【】”符号。 对于移动推送订阅者推送消息,message消息必须符合移动推送平台的消息格式,消息格式请参见application消息体格式。否则移动app无法收到消息,目前支持的平台有HMS、APNS、APNS_SANDBOX。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * messageStructure Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functionstage”、“HMS”、“APNS”以及“APNS_SANDBOX”。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * messageTemplateName 消息模板名称,可通过[查询消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * tags tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 + * timeToLive 指消息在SMN系统内部的最长存留时间。超过该存留时间,系统将不再发送该消息。单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @var string[] + */ + protected static $getters = [ + 'subject' => 'getSubject', + 'message' => 'getMessage', + 'messageStructure' => 'getMessageStructure', + 'messageTemplateName' => 'getMessageTemplateName', + 'tags' => 'getTags', + 'timeToLive' => 'getTimeToLive' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['messageStructure'] = isset($data['messageStructure']) ? $data['messageStructure'] : null; + $this->container['messageTemplateName'] = isset($data['messageTemplateName']) ? $data['messageTemplateName'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['timeToLive'] = isset($data['timeToLive']) ? $data['timeToLive'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets subject + * 消息标题,给邮箱订阅者发送邮件时作为邮件主题,长度不能超过512个字节。 + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject 消息标题,给邮箱订阅者发送邮件时作为邮件主题,长度不能超过512个字节。 + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + return $this; + } + + /** + * Gets message + * 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,长度不超过490个字符,超出部分系统自动截断。短信内容不能包含“[]”或者“【】”符号。 对于移动推送订阅者推送消息,message消息必须符合移动推送平台的消息格式,消息格式请参见application消息体格式。否则移动app无法收到消息,目前支持的平台有HMS、APNS、APNS_SANDBOX。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,长度不超过490个字符,超出部分系统自动截断。短信内容不能包含“[]”或者“【】”符号。 对于移动推送订阅者推送消息,message消息必须符合移动推送平台的消息格式,消息格式请参见application消息体格式。否则移动app无法收到消息,目前支持的平台有HMS、APNS、APNS_SANDBOX。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + return $this; + } + + /** + * Gets messageStructure + * Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functionstage”、“HMS”、“APNS”以及“APNS_SANDBOX”。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * + * @return string|null + */ + public function getMessageStructure() + { + return $this->container['messageStructure']; + } + + /** + * Sets messageStructure + * + * @param string|null $messageStructure Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functionstage”、“HMS”、“APNS”以及“APNS_SANDBOX”。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + * + * @return $this + */ + public function setMessageStructure($messageStructure) + { + $this->container['messageStructure'] = $messageStructure; + return $this; + } + + /** + * Gets messageTemplateName + * 消息模板名称,可通过[查询消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * + * @return string|null + */ + public function getMessageTemplateName() + { + return $this->container['messageTemplateName']; + } + + /** + * Sets messageTemplateName + * + * @param string|null $messageTemplateName 消息模板名称,可通过[查询消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + * + * @return $this + */ + public function setMessageTemplateName($messageTemplateName) + { + $this->container['messageTemplateName'] = $messageTemplateName; + return $this; + } + + /** + * Gets tags + * tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 + * + * @return map[string,string]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param map[string,string]|null $tags tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets timeToLive + * 指消息在SMN系统内部的最长存留时间。超过该存留时间,系统将不再发送该消息。单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @return string|null + */ + public function getTimeToLive() + { + return $this->container['timeToLive']; + } + + /** + * Sets timeToLive + * + * @param string|null $timeToLive 指消息在SMN系统内部的最长存留时间。超过该存留时间,系统将不再发送该消息。单位是s,变量默认值是3600s,即一小时。值为正整数且小于等于3600*24。 + * + * @return $this + */ + public function setTimeToLive($timeToLive) + { + $this->container['timeToLive'] = $timeToLive; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/PublishMessageResponse.php b/Services/Smn/V2/Model/PublishMessageResponse.php new file mode 100755 index 0000000..bc9cb76 --- /dev/null +++ b/Services/Smn/V2/Model/PublishMessageResponse.php @@ -0,0 +1,301 @@ + 'string', + 'messageId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * messageId 唯一的消息ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null, + 'messageId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * messageId 唯一的消息ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id', + 'messageId' => 'message_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * messageId 唯一的消息ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId', + 'messageId' => 'setMessageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * messageId 唯一的消息ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId', + 'messageId' => 'getMessageId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Gets messageId + * 唯一的消息ID。 + * + * @return string|null + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string|null $messageId 唯一的消息ID。 + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ResourceDetail.php b/Services/Smn/V2/Model/ResourceDetail.php new file mode 100755 index 0000000..9832469 --- /dev/null +++ b/Services/Smn/V2/Model/ResourceDetail.php @@ -0,0 +1,382 @@ + 'string', + 'detailId' => 'string', + 'topicUrn' => 'string', + 'displayName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * enterpriseProjectId 企业项目ID + * detailId 详情ID + * topicUrn topic唯一标识 + * displayName 显示名 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'enterpriseProjectId' => null, + 'detailId' => null, + 'topicUrn' => null, + 'displayName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * enterpriseProjectId 企业项目ID + * detailId 详情ID + * topicUrn topic唯一标识 + * displayName 显示名 + * + * @var string[] + */ + protected static $attributeMap = [ + 'enterpriseProjectId' => 'enterprise_project_id', + 'detailId' => 'detailId', + 'topicUrn' => 'topic_urn', + 'displayName' => 'display_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * enterpriseProjectId 企业项目ID + * detailId 详情ID + * topicUrn topic唯一标识 + * displayName 显示名 + * + * @var string[] + */ + protected static $setters = [ + 'enterpriseProjectId' => 'setEnterpriseProjectId', + 'detailId' => 'setDetailId', + 'topicUrn' => 'setTopicUrn', + 'displayName' => 'setDisplayName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * enterpriseProjectId 企业项目ID + * detailId 详情ID + * topicUrn topic唯一标识 + * displayName 显示名 + * + * @var string[] + */ + protected static $getters = [ + 'enterpriseProjectId' => 'getEnterpriseProjectId', + 'detailId' => 'getDetailId', + 'topicUrn' => 'getTopicUrn', + 'displayName' => 'getDisplayName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enterpriseProjectId'] = isset($data['enterpriseProjectId']) ? $data['enterpriseProjectId'] : null; + $this->container['detailId'] = isset($data['detailId']) ? $data['detailId'] : null; + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['displayName'] = isset($data['displayName']) ? $data['displayName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['enterpriseProjectId'] === null) { + $invalidProperties[] = "'enterpriseProjectId' can't be null"; + } + if ($this->container['detailId'] === null) { + $invalidProperties[] = "'detailId' can't be null"; + } + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + if ($this->container['displayName'] === null) { + $invalidProperties[] = "'displayName' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets enterpriseProjectId + * 企业项目ID + * + * @return string + */ + public function getEnterpriseProjectId() + { + return $this->container['enterpriseProjectId']; + } + + /** + * Sets enterpriseProjectId + * + * @param string $enterpriseProjectId 企业项目ID + * + * @return $this + */ + public function setEnterpriseProjectId($enterpriseProjectId) + { + $this->container['enterpriseProjectId'] = $enterpriseProjectId; + return $this; + } + + /** + * Gets detailId + * 详情ID + * + * @return string + */ + public function getDetailId() + { + return $this->container['detailId']; + } + + /** + * Sets detailId + * + * @param string $detailId 详情ID + * + * @return $this + */ + public function setDetailId($detailId) + { + $this->container['detailId'] = $detailId; + return $this; + } + + /** + * Gets topicUrn + * topic唯一标识 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn topic唯一标识 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets displayName + * 显示名 + * + * @return string + */ + public function getDisplayName() + { + return $this->container['displayName']; + } + + /** + * Sets displayName + * + * @param string $displayName 显示名 + * + * @return $this + */ + public function setDisplayName($displayName) + { + $this->container['displayName'] = $displayName; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ResourceTag.php b/Services/Smn/V2/Model/ResourceTag.php new file mode 100755 index 0000000..f638b16 --- /dev/null +++ b/Services/Smn/V2/Model/ResourceTag.php @@ -0,0 +1,306 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets value + * 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/ResourceTags.php b/Services/Smn/V2/Model/ResourceTags.php new file mode 100755 index 0000000..28f8018 --- /dev/null +++ b/Services/Smn/V2/Model/ResourceTags.php @@ -0,0 +1,306 @@ + 'string', + 'values' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 键。 - 最大长度127个unicode字符。 - key不能为空。 + * values 值列表。 - 最多10个value。 - value不允许重复。 - 每个值最大长度255个unicode字符。 - 如果values为空则表示any_value。 - value之间为或的关系。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'values' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 键。 - 最大长度127个unicode字符。 - key不能为空。 + * values 值列表。 - 最多10个value。 - value不允许重复。 - 每个值最大长度255个unicode字符。 - 如果values为空则表示any_value。 - value之间为或的关系。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'values' => 'values' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 键。 - 最大长度127个unicode字符。 - key不能为空。 + * values 值列表。 - 最多10个value。 - value不允许重复。 - 每个值最大长度255个unicode字符。 - 如果values为空则表示any_value。 - value之间为或的关系。 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'values' => 'setValues' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 键。 - 最大长度127个unicode字符。 - key不能为空。 + * values 值列表。 - 最多10个value。 - value不允许重复。 - 每个值最大长度255个unicode字符。 - 如果values为空则表示any_value。 - value之间为或的关系。 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'values' => 'getValues' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['values'] = isset($data['values']) ? $data['values'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['values'] === null) { + $invalidProperties[] = "'values' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 键。 - 最大长度127个unicode字符。 - key不能为空。 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 键。 - 最大长度127个unicode字符。 - key不能为空。 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets values + * 值列表。 - 最多10个value。 - value不允许重复。 - 每个值最大长度255个unicode字符。 - 如果values为空则表示any_value。 - value之间为或的关系。 + * + * @return string[] + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[] $values 值列表。 - 最多10个value。 - value不允许重复。 - 每个值最大长度255个unicode字符。 - 如果values为空则表示any_value。 - value之间为或的关系。 + * + * @return $this + */ + public function setValues($values) + { + $this->container['values'] = $values; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/Statement.php b/Services/Smn/V2/Model/Statement.php new file mode 100755 index 0000000..6ee7b0c --- /dev/null +++ b/Services/Smn/V2/Model/Statement.php @@ -0,0 +1,516 @@ + 'string', + 'effect' => 'string', + 'principal' => 'string', + 'notPrincipal' => 'string', + 'action' => 'string', + 'notAction' => 'string', + 'resource' => 'string', + 'notResource' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * sid Statement语句的ID。 Statement语句ID必须是唯一的,例如statement01、statement02。 + * effect Statement语句的效果。“Allow”或者“Deny”。 + * principal Statement语句作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * notPrincipal NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * action Statement语句作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * notAction Statement语句排除作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * resource Statement语句作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * notResource Statement语句排除作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'sid' => null, + 'effect' => null, + 'principal' => null, + 'notPrincipal' => null, + 'action' => null, + 'notAction' => null, + 'resource' => null, + 'notResource' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * sid Statement语句的ID。 Statement语句ID必须是唯一的,例如statement01、statement02。 + * effect Statement语句的效果。“Allow”或者“Deny”。 + * principal Statement语句作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * notPrincipal NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * action Statement语句作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * notAction Statement语句排除作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * resource Statement语句作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * notResource Statement语句排除作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'sid' => 'Sid', + 'effect' => 'Effect', + 'principal' => 'Principal', + 'notPrincipal' => 'NotPrincipal', + 'action' => 'Action', + 'notAction' => 'NotAction', + 'resource' => 'Resource', + 'notResource' => 'NotResource' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * sid Statement语句的ID。 Statement语句ID必须是唯一的,例如statement01、statement02。 + * effect Statement语句的效果。“Allow”或者“Deny”。 + * principal Statement语句作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * notPrincipal NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * action Statement语句作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * notAction Statement语句排除作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * resource Statement语句作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * notResource Statement语句排除作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @var string[] + */ + protected static $setters = [ + 'sid' => 'setSid', + 'effect' => 'setEffect', + 'principal' => 'setPrincipal', + 'notPrincipal' => 'setNotPrincipal', + 'action' => 'setAction', + 'notAction' => 'setNotAction', + 'resource' => 'setResource', + 'notResource' => 'setNotResource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * sid Statement语句的ID。 Statement语句ID必须是唯一的,例如statement01、statement02。 + * effect Statement语句的效果。“Allow”或者“Deny”。 + * principal Statement语句作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * notPrincipal NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * action Statement语句作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * notAction Statement语句排除作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * resource Statement语句作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * notResource Statement语句排除作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @var string[] + */ + protected static $getters = [ + 'sid' => 'getSid', + 'effect' => 'getEffect', + 'principal' => 'getPrincipal', + 'notPrincipal' => 'getNotPrincipal', + 'action' => 'getAction', + 'notAction' => 'getNotAction', + 'resource' => 'getResource', + 'notResource' => 'getNotResource' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sid'] = isset($data['sid']) ? $data['sid'] : null; + $this->container['effect'] = isset($data['effect']) ? $data['effect'] : null; + $this->container['principal'] = isset($data['principal']) ? $data['principal'] : null; + $this->container['notPrincipal'] = isset($data['notPrincipal']) ? $data['notPrincipal'] : null; + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['notAction'] = isset($data['notAction']) ? $data['notAction'] : null; + $this->container['resource'] = isset($data['resource']) ? $data['resource'] : null; + $this->container['notResource'] = isset($data['notResource']) ? $data['notResource'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['sid'] === null) { + $invalidProperties[] = "'sid' can't be null"; + } + if ($this->container['effect'] === null) { + $invalidProperties[] = "'effect' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets sid + * Statement语句的ID。 Statement语句ID必须是唯一的,例如statement01、statement02。 + * + * @return string + */ + public function getSid() + { + return $this->container['sid']; + } + + /** + * Sets sid + * + * @param string $sid Statement语句的ID。 Statement语句ID必须是唯一的,例如statement01、statement02。 + * + * @return $this + */ + public function setSid($sid) + { + $this->container['sid'] = $sid; + return $this; + } + + /** + * Gets effect + * Statement语句的效果。“Allow”或者“Deny”。 + * + * @return string + */ + public function getEffect() + { + return $this->container['effect']; + } + + /** + * Sets effect + * + * @param string $effect Statement语句的效果。“Allow”或者“Deny”。 + * + * @return $this + */ + public function setEffect($effect) + { + $this->container['effect'] = $effect; + return $this; + } + + /** + * Gets principal + * Statement语句作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * + * @return string|null + */ + public function getPrincipal() + { + return $this->container['principal']; + } + + /** + * Sets principal + * + * @param string|null $principal Statement语句作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * + * @return $this + */ + public function setPrincipal($principal) + { + $this->container['principal'] = $principal; + return $this; + } + + /** + * Gets notPrincipal + * NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * + * @return string|null + */ + public function getNotPrincipal() + { + return $this->container['notPrincipal']; + } + + /** + * Sets notPrincipal + * + * @param string|null $notPrincipal NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root,其中domainId为其他用户的“账号ID”。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + * + * @return $this + */ + public function setNotPrincipal($notPrincipal) + { + $this->container['notPrincipal'] = $notPrincipal; + return $this; + } + + /** + * Gets action + * Statement语句作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * + * @return string|null + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string|null $action Statement语句作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + return $this; + } + + /** + * Gets notAction + * Statement语句排除作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * + * @return string|null + */ + public function getNotAction() + { + return $this->container['notAction']; + } + + /** + * Sets notAction + * + * @param string|null $notAction Statement语句排除作用的操作。 允许使用通配符来表示一类操作,例如:SMN:Update*、SMN:Delete*。如果只填写“*”,表示Statement语句作用的操作为该资源支持的所有操作。 Action元素和NotAction元素两者任选其一。 目前支持的操作有: SMN:UpdateTopic SMN:DeleteTopic SMN:QueryTopicDetail SMN:ListTopicAttributes SMN:UpdateTopicAttribute SMN:DeleteTopicAttributes SMN:DeleteTopicAttributeByName SMN:ListSubscriptionsByTopic SMN:Subscribe SMN:Unsubscribe SMN:Publish + * + * @return $this + */ + public function setNotAction($notAction) + { + $this->container['notAction'] = $notAction; + return $this; + } + + /** + * Gets resource + * Statement语句作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @return string|null + */ + public function getResource() + { + return $this->container['resource']; + } + + /** + * Sets resource + * + * @param string|null $resource Statement语句作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @return $this + */ + public function setResource($resource) + { + $this->container['resource'] = $resource; + return $this; + } + + /** + * Gets notResource + * Statement语句排除作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @return string|null + */ + public function getNotResource() + { + return $this->container['notResource']; + } + + /** + * Sets notResource + * + * @param string|null $notResource Statement语句排除作用的主题。 Resource和NotResource两者任选其一。选定后,填写内容为主题URN。 + * + * @return $this + */ + public function setNotResource($notResource) + { + $this->container['notResource'] = $notResource; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/TagMatch.php b/Services/Smn/V2/Model/TagMatch.php new file mode 100755 index 0000000..63af387 --- /dev/null +++ b/Services/Smn/V2/Model/TagMatch.php @@ -0,0 +1,306 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'key' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets key + * 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key 键,表示要匹配的字段。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - key不能重复,value为匹配的值。 - 此字段为固定字典值。 - 不允许为空字符串。 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + return $this; + } + + /** + * Gets value + * 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 值。 当前key的参数值只能取“resource_name”,此时value的参数值为云服务器名称。 - 每个值最大长度255个unicode字符。 - 不可以为空。 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/TagResource.php b/Services/Smn/V2/Model/TagResource.php new file mode 100755 index 0000000..78f139b --- /dev/null +++ b/Services/Smn/V2/Model/TagResource.php @@ -0,0 +1,382 @@ + 'string', + 'resourceDetail' => '\G42Cloud\SDK\Smn\V2\Model\ResourceDetail', + 'tags' => '\G42Cloud\SDK\Smn\V2\Model\ResourceTag[]', + 'resourceName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * resourceId 资源ID。 + * resourceDetail resourceDetail + * tags 标签列表。 + * resourceName 资源名称。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'resourceId' => null, + 'resourceDetail' => null, + 'tags' => null, + 'resourceName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * resourceId 资源ID。 + * resourceDetail resourceDetail + * tags 标签列表。 + * resourceName 资源名称。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'resourceId' => 'resource_id', + 'resourceDetail' => 'resource_detail', + 'tags' => 'tags', + 'resourceName' => 'resource_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * resourceId 资源ID。 + * resourceDetail resourceDetail + * tags 标签列表。 + * resourceName 资源名称。 + * + * @var string[] + */ + protected static $setters = [ + 'resourceId' => 'setResourceId', + 'resourceDetail' => 'setResourceDetail', + 'tags' => 'setTags', + 'resourceName' => 'setResourceName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * resourceId 资源ID。 + * resourceDetail resourceDetail + * tags 标签列表。 + * resourceName 资源名称。 + * + * @var string[] + */ + protected static $getters = [ + 'resourceId' => 'getResourceId', + 'resourceDetail' => 'getResourceDetail', + 'tags' => 'getTags', + 'resourceName' => 'getResourceName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['resourceId'] = isset($data['resourceId']) ? $data['resourceId'] : null; + $this->container['resourceDetail'] = isset($data['resourceDetail']) ? $data['resourceDetail'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['resourceName'] = isset($data['resourceName']) ? $data['resourceName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['resourceId'] === null) { + $invalidProperties[] = "'resourceId' can't be null"; + } + if ($this->container['resourceDetail'] === null) { + $invalidProperties[] = "'resourceDetail' can't be null"; + } + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['resourceName'] === null) { + $invalidProperties[] = "'resourceName' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets resourceId + * 资源ID。 + * + * @return string + */ + public function getResourceId() + { + return $this->container['resourceId']; + } + + /** + * Sets resourceId + * + * @param string $resourceId 资源ID。 + * + * @return $this + */ + public function setResourceId($resourceId) + { + $this->container['resourceId'] = $resourceId; + return $this; + } + + /** + * Gets resourceDetail + * resourceDetail + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceDetail + */ + public function getResourceDetail() + { + return $this->container['resourceDetail']; + } + + /** + * Sets resourceDetail + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceDetail $resourceDetail resourceDetail + * + * @return $this + */ + public function setResourceDetail($resourceDetail) + { + $this->container['resourceDetail'] = $resourceDetail; + return $this; + } + + /** + * Gets tags + * 标签列表。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\ResourceTag[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \G42Cloud\SDK\Smn\V2\Model\ResourceTag[] $tags 标签列表。 + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + return $this; + } + + /** + * Gets resourceName + * 资源名称。 + * + * @return string + */ + public function getResourceName() + { + return $this->container['resourceName']; + } + + /** + * Sets resourceName + * + * @param string $resourceName 资源名称。 + * + * @return $this + */ + public function setResourceName($resourceName) + { + $this->container['resourceName'] = $resourceName; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/TopicAttribute.php b/Services/Smn/V2/Model/TopicAttribute.php new file mode 100755 index 0000000..e0024a7 --- /dev/null +++ b/Services/Smn/V2/Model/TopicAttribute.php @@ -0,0 +1,344 @@ + 'string', + 'id' => 'string', + 'statement' => '\G42Cloud\SDK\Smn\V2\Model\Statement[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * version 访问策略规范版本。目前只支持“2016-09-07”。 + * id 策略的唯一标识。不能为空。 + * statement 访问策略是通过Statement语句来定义的。一个访问策略可包含一条或多条Statement语句。通过Statement语句向其他用户或云服务授权对主题的操作。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'version' => null, + 'id' => null, + 'statement' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * version 访问策略规范版本。目前只支持“2016-09-07”。 + * id 策略的唯一标识。不能为空。 + * statement 访问策略是通过Statement语句来定义的。一个访问策略可包含一条或多条Statement语句。通过Statement语句向其他用户或云服务授权对主题的操作。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'version' => 'Version', + 'id' => 'Id', + 'statement' => 'Statement' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * version 访问策略规范版本。目前只支持“2016-09-07”。 + * id 策略的唯一标识。不能为空。 + * statement 访问策略是通过Statement语句来定义的。一个访问策略可包含一条或多条Statement语句。通过Statement语句向其他用户或云服务授权对主题的操作。 + * + * @var string[] + */ + protected static $setters = [ + 'version' => 'setVersion', + 'id' => 'setId', + 'statement' => 'setStatement' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * version 访问策略规范版本。目前只支持“2016-09-07”。 + * id 策略的唯一标识。不能为空。 + * statement 访问策略是通过Statement语句来定义的。一个访问策略可包含一条或多条Statement语句。通过Statement语句向其他用户或云服务授权对主题的操作。 + * + * @var string[] + */ + protected static $getters = [ + 'version' => 'getVersion', + 'id' => 'getId', + 'statement' => 'getStatement' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['version'] = isset($data['version']) ? $data['version'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['statement'] = isset($data['statement']) ? $data['statement'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['version'] === null) { + $invalidProperties[] = "'version' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['statement'] === null) { + $invalidProperties[] = "'statement' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets version + * 访问策略规范版本。目前只支持“2016-09-07”。 + * + * @return string + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string $version 访问策略规范版本。目前只支持“2016-09-07”。 + * + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + return $this; + } + + /** + * Gets id + * 策略的唯一标识。不能为空。 + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 策略的唯一标识。不能为空。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets statement + * 访问策略是通过Statement语句来定义的。一个访问策略可包含一条或多条Statement语句。通过Statement语句向其他用户或云服务授权对主题的操作。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\Statement[] + */ + public function getStatement() + { + return $this->container['statement']; + } + + /** + * Sets statement + * + * @param \G42Cloud\SDK\Smn\V2\Model\Statement[] $statement 访问策略是通过Statement语句来定义的。一个访问策略可包含一条或多条Statement语句。通过Statement语句向其他用户或云服务授权对主题的操作。 + * + * @return $this + */ + public function setStatement($statement) + { + $this->container['statement'] = $statement; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateApplicationEndpointRequest.php b/Services/Smn/V2/Model/UpdateApplicationEndpointRequest.php new file mode 100755 index 0000000..4698421 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateApplicationEndpointRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationEndpointRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'endpointUrn' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'endpointUrn' => 'endpoint_urn', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'endpointUrn' => 'setEndpointUrn', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'endpointUrn' => 'getEndpointUrn', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['endpointUrn'] = isset($data['endpointUrn']) ? $data['endpointUrn'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['endpointUrn'] === null) { + $invalidProperties[] = "'endpointUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets endpointUrn + * Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @return string + */ + public function getEndpointUrn() + { + return $this->container['endpointUrn']; + } + + /** + * Sets endpointUrn + * + * @param string $endpointUrn Endpoint的唯一资源标识,可通过[查询Application的Endpoint列表](https://support.huaweicloud.com/api-smn/ListApplicationEndpoints.html)获取该标识。 + * + * @return $this + */ + public function setEndpointUrn($endpointUrn) + { + $this->container['endpointUrn'] = $endpointUrn; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\UpdateApplicationEndpointRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\UpdateApplicationEndpointRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateApplicationEndpointRequestBody.php b/Services/Smn/V2/Model/UpdateApplicationEndpointRequestBody.php new file mode 100755 index 0000000..33887ef --- /dev/null +++ b/Services/Smn/V2/Model/UpdateApplicationEndpointRequestBody.php @@ -0,0 +1,300 @@ + 'string', + 'userData' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * enabled 设备是否可用,值为true或false字符串。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'enabled' => null, + 'userData' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * enabled 设备是否可用,值为true或false字符串。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'userData' => 'user_data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * enabled 设备是否可用,值为true或false字符串。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'userData' => 'setUserData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * enabled 设备是否可用,值为true或false字符串。 + * userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'userData' => 'getUserData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['userData'] = isset($data['userData']) ? $data['userData'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets enabled + * 设备是否可用,值为true或false字符串。 + * + * @return string|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param string|null $enabled 设备是否可用,值为true或false字符串。 + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + return $this; + } + + /** + * Gets userData + * 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @return string|null + */ + public function getUserData() + { + return $this->container['userData']; + } + + /** + * Sets userData + * + * @param string|null $userData 用户自定义数据,最大长度支持UTF-8编码后2048字节。 + * + * @return $this + */ + public function setUserData($userData) + { + $this->container['userData'] = $userData; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateApplicationEndpointResponse.php b/Services/Smn/V2/Model/UpdateApplicationEndpointResponse.php new file mode 100755 index 0000000..6849914 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateApplicationEndpointResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateApplicationRequest.php b/Services/Smn/V2/Model/UpdateApplicationRequest.php new file mode 100755 index 0000000..97b9b58 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateApplicationRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationUrn' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationUrn' => 'application_urn', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'applicationUrn' => 'setApplicationUrn', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'applicationUrn' => 'getApplicationUrn', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationUrn'] = isset($data['applicationUrn']) ? $data['applicationUrn'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['applicationUrn'] === null) { + $invalidProperties[] = "'applicationUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets applicationUrn + * Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return string + */ + public function getApplicationUrn() + { + return $this->container['applicationUrn']; + } + + /** + * Sets applicationUrn + * + * @param string $applicationUrn Application的唯一资源标识,可通过[查询Application](https://support.huaweicloud.com/api-smn/ListApplications.html)获取该标识。 + * + * @return $this + */ + public function setApplicationUrn($applicationUrn) + { + $this->container['applicationUrn'] = $applicationUrn; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\UpdateApplicationRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\UpdateApplicationRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateApplicationRequestBody.php b/Services/Smn/V2/Model/UpdateApplicationRequestBody.php new file mode 100755 index 0000000..af6e8fd --- /dev/null +++ b/Services/Smn/V2/Model/UpdateApplicationRequestBody.php @@ -0,0 +1,306 @@ + 'string', + 'platformCredential' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'platformPrincipal' => null, + 'platformCredential' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'platformPrincipal' => 'platform_principal', + 'platformCredential' => 'platform_credential' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $setters = [ + 'platformPrincipal' => 'setPlatformPrincipal', + 'platformCredential' => 'setPlatformCredential' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @var string[] + */ + protected static $getters = [ + 'platformPrincipal' => 'getPlatformPrincipal', + 'platformCredential' => 'getPlatformCredential' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['platformPrincipal'] = isset($data['platformPrincipal']) ? $data['platformPrincipal'] : null; + $this->container['platformCredential'] = isset($data['platformCredential']) ? $data['platformCredential'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['platformPrincipal'] === null) { + $invalidProperties[] = "'platformPrincipal' can't be null"; + } + if ($this->container['platformCredential'] === null) { + $invalidProperties[] = "'platformCredential' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets platformPrincipal + * 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * + * @return string + */ + public function getPlatformPrincipal() + { + return $this->container['platformPrincipal']; + } + + /** + * Sets platformPrincipal + * + * @param string $platformPrincipal 对于HMS平台是APP ID,只能包含英文字母和数字,最大20个字符。 对于苹果APNS、APNS_SandBox平台是推送证书,大小不超过8K,且是Base64编码。 + * + * @return $this + */ + public function setPlatformPrincipal($platformPrincipal) + { + $this->container['platformPrincipal'] = $platformPrincipal; + return $this; + } + + /** + * Gets platformCredential + * 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @return string + */ + public function getPlatformCredential() + { + return $this->container['platformCredential']; + } + + /** + * Sets platformCredential + * + * @param string $platformCredential 对于HMS平台是APP SECRET, 只能包含英文字母和数字,32到64个字符。 对于苹果APNS、APNS_SandBox平台是推送证书的私钥(private key), 大小不超过8K,且是Base64编码。 + * + * @return $this + */ + public function setPlatformCredential($platformCredential) + { + $this->container['platformCredential'] = $platformCredential; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateApplicationResponse.php b/Services/Smn/V2/Model/UpdateApplicationResponse.php new file mode 100755 index 0000000..ce4ad8e --- /dev/null +++ b/Services/Smn/V2/Model/UpdateApplicationResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateMessageTemplateRequest.php b/Services/Smn/V2/Model/UpdateMessageTemplateRequest.php new file mode 100755 index 0000000..733c624 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateMessageTemplateRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\UpdateMessageTemplateRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'messageTemplateId' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageTemplateId' => 'message_template_id', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'messageTemplateId' => 'setMessageTemplateId', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'messageTemplateId' => 'getMessageTemplateId', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageTemplateId'] = isset($data['messageTemplateId']) ? $data['messageTemplateId'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['messageTemplateId'] === null) { + $invalidProperties[] = "'messageTemplateId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets messageTemplateId + * 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @return string + */ + public function getMessageTemplateId() + { + return $this->container['messageTemplateId']; + } + + /** + * Sets messageTemplateId + * + * @param string $messageTemplateId 模板唯一的资源标识,可通过查询[消息模板列表](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)获取该标识。 + * + * @return $this + */ + public function setMessageTemplateId($messageTemplateId) + { + $this->container['messageTemplateId'] = $messageTemplateId; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\UpdateMessageTemplateRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\UpdateMessageTemplateRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateMessageTemplateRequestBody.php b/Services/Smn/V2/Model/UpdateMessageTemplateRequestBody.php new file mode 100755 index 0000000..97b2466 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateMessageTemplateRequestBody.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * content 模板内容。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'content' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * content 模板内容。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'content' => 'content' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * content 模板内容。 + * + * @var string[] + */ + protected static $setters = [ + 'content' => 'setContent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * content 模板内容。 + * + * @var string[] + */ + protected static $getters = [ + 'content' => 'getContent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets content + * 模板内容。 + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content 模板内容。 + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateMessageTemplateResponse.php b/Services/Smn/V2/Model/UpdateMessageTemplateResponse.php new file mode 100755 index 0000000..81281a3 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateMessageTemplateResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateTopicAttributeRequest.php b/Services/Smn/V2/Model/UpdateTopicAttributeRequest.php new file mode 100755 index 0000000..3c72713 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateTopicAttributeRequest.php @@ -0,0 +1,341 @@ + 'string', + 'name' => 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\UpdateTopicAttributeRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'name' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'name' => 'name', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'name' => 'setName', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'name' => 'getName', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识,可通过[查询主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets name + * 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 主题策略名称。 只支持特定的策略名称,请参见[Topic属性表](https://support.huaweicloud.com/intl/zh-cn/api-smn/smn_api_a1000.html)。 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\UpdateTopicAttributeRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\UpdateTopicAttributeRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateTopicAttributeRequestBody.php b/Services/Smn/V2/Model/UpdateTopicAttributeRequestBody.php new file mode 100755 index 0000000..9b11372 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateTopicAttributeRequestBody.php @@ -0,0 +1,268 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * value 1. 当请求参数name为access_policy时,value为Topic属性值,最大支持30KB。 2. 当请求参数name为introduction时,value为topic简介,最大长度120B。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * value 1. 当请求参数name为access_policy时,value为Topic属性值,最大支持30KB。 2. 当请求参数name为introduction时,value为topic简介,最大长度120B。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * value 1. 当请求参数name为access_policy时,value为Topic属性值,最大支持30KB。 2. 当请求参数name为introduction时,value为topic简介,最大长度120B。 + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * value 1. 当请求参数name为access_policy时,value为Topic属性值,最大支持30KB。 2. 当请求参数name为introduction时,value为topic简介,最大长度120B。 + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets value + * 1. 当请求参数name为access_policy时,value为Topic属性值,最大支持30KB。 2. 当请求参数name为introduction时,value为topic简介,最大长度120B。 + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 1. 当请求参数name为access_policy时,value为Topic属性值,最大支持30KB。 2. 当请求参数name为introduction时,value为topic简介,最大长度120B。 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateTopicAttributeResponse.php b/Services/Smn/V2/Model/UpdateTopicAttributeResponse.php new file mode 100755 index 0000000..28c1bd9 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateTopicAttributeResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateTopicRequest.php b/Services/Smn/V2/Model/UpdateTopicRequest.php new file mode 100755 index 0000000..681992f --- /dev/null +++ b/Services/Smn/V2/Model/UpdateTopicRequest.php @@ -0,0 +1,303 @@ + 'string', + 'body' => '\G42Cloud\SDK\Smn\V2\Model\UpdateTopicRequestBody' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'topicUrn' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $attributeMap = [ + 'topicUrn' => 'topic_urn', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $setters = [ + 'topicUrn' => 'setTopicUrn', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * topicUrn Topic的唯一的资源标识。可以通过[查看主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * body body + * + * @var string[] + */ + protected static $getters = [ + 'topicUrn' => 'getTopicUrn', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['topicUrn'] = isset($data['topicUrn']) ? $data['topicUrn'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['topicUrn'] === null) { + $invalidProperties[] = "'topicUrn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets topicUrn + * Topic的唯一的资源标识。可以通过[查看主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return string + */ + public function getTopicUrn() + { + return $this->container['topicUrn']; + } + + /** + * Sets topicUrn + * + * @param string $topicUrn Topic的唯一的资源标识。可以通过[查看主题列表](https://support.huaweicloud.com/api-smn/smn_api_51004.html)获取该标识。 + * + * @return $this + */ + public function setTopicUrn($topicUrn) + { + $this->container['topicUrn'] = $topicUrn; + return $this; + } + + /** + * Gets body + * body + * + * @return \G42Cloud\SDK\Smn\V2\Model\UpdateTopicRequestBody|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param \G42Cloud\SDK\Smn\V2\Model\UpdateTopicRequestBody|null $body body + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateTopicRequestBody.php b/Services/Smn/V2/Model/UpdateTopicRequestBody.php new file mode 100755 index 0000000..4c01e36 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateTopicRequestBody.php @@ -0,0 +1,274 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'displayName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'displayName' => 'display_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。 + * + * @var string[] + */ + protected static $setters = [ + 'displayName' => 'setDisplayName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。 + * + * @var string[] + */ + protected static $getters = [ + 'displayName' => 'getDisplayName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['displayName'] = isset($data['displayName']) ? $data['displayName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['displayName'] === null) { + $invalidProperties[] = "'displayName' can't be null"; + } + if ((mb_strlen($this->container['displayName']) > 192)) { + $invalidProperties[] = "invalid value for 'displayName', the character length must be smaller than or equal to 192."; + } + if ((mb_strlen($this->container['displayName']) < 1)) { + $invalidProperties[] = "invalid value for 'displayName', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets displayName + * Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。 + * + * @return string + */ + public function getDisplayName() + { + return $this->container['displayName']; + } + + /** + * Sets displayName + * + * @param string $displayName Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。 + * + * @return $this + */ + public function setDisplayName($displayName) + { + $this->container['displayName'] = $displayName; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/UpdateTopicResponse.php b/Services/Smn/V2/Model/UpdateTopicResponse.php new file mode 100755 index 0000000..bfcffa2 --- /dev/null +++ b/Services/Smn/V2/Model/UpdateTopicResponse.php @@ -0,0 +1,266 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'requestId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'requestId' => 'request_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $setters = [ + 'requestId' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * requestId 请求的唯一标识ID。 + * + * @var string[] + */ + protected static $getters = [ + 'requestId' => 'getRequestId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['requestId'] = isset($data['requestId']) ? $data['requestId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets requestId + * 请求的唯一标识ID。 + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId 请求的唯一标识ID。 + * + * @return $this + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Model/VersionItem.php b/Services/Smn/V2/Model/VersionItem.php new file mode 100755 index 0000000..9520a22 --- /dev/null +++ b/Services/Smn/V2/Model/VersionItem.php @@ -0,0 +1,458 @@ + 'string', + 'minVersion' => 'string', + 'status' => 'string', + 'updated' => 'string', + 'version' => 'string', + 'links' => '\G42Cloud\SDK\Smn\V2\Model\LinksItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * id 版本ID(版本号),如v2。 + * minVersion 若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。 + * status 版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 + * updated 版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。 + * version 若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。 + * links API的URL地址。 + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'minVersion' => null, + 'status' => null, + 'updated' => null, + 'version' => null, + 'links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * id 版本ID(版本号),如v2。 + * minVersion 若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。 + * status 版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 + * updated 版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。 + * version 若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。 + * links API的URL地址。 + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'minVersion' => 'min_version', + 'status' => 'status', + 'updated' => 'updated', + 'version' => 'version', + 'links' => 'links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * id 版本ID(版本号),如v2。 + * minVersion 若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。 + * status 版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 + * updated 版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。 + * version 若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。 + * links API的URL地址。 + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'minVersion' => 'setMinVersion', + 'status' => 'setStatus', + 'updated' => 'setUpdated', + 'version' => 'setVersion', + 'links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * id 版本ID(版本号),如v2。 + * minVersion 若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。 + * status 版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 + * updated 版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。 + * version 若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。 + * links API的URL地址。 + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'minVersion' => 'getMinVersion', + 'status' => 'getStatus', + 'updated' => 'getUpdated', + 'version' => 'getVersion', + 'links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['minVersion'] = isset($data['minVersion']) ? $data['minVersion'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['version'] = isset($data['version']) ? $data['version'] : null; + $this->container['links'] = isset($data['links']) ? $data['links'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['minVersion'] === null) { + $invalidProperties[] = "'minVersion' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['updated'] === null) { + $invalidProperties[] = "'updated' can't be null"; + } + if ($this->container['version'] === null) { + $invalidProperties[] = "'version' can't be null"; + } + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * 版本ID(版本号),如v2。 + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 版本ID(版本号),如v2。 + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + return $this; + } + + /** + * Gets minVersion + * 若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。 + * + * @return string + */ + public function getMinVersion() + { + return $this->container['minVersion']; + } + + /** + * Sets minVersion + * + * @param string $minVersion 若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。 + * + * @return $this + */ + public function setMinVersion($minVersion) + { + $this->container['minVersion'] = $minVersion; + return $this; + } + + /** + * Gets status + * 版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status 版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + return $this; + } + + /** + * Gets updated + * 版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。 + * + * @return string + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param string $updated 版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。 + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + return $this; + } + + /** + * Gets version + * 若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。 + * + * @return string + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string $version 若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。 + * + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + return $this; + } + + /** + * Gets links + * API的URL地址。 + * + * @return \G42Cloud\SDK\Smn\V2\Model\LinksItem[] + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \G42Cloud\SDK\Smn\V2\Model\LinksItem[] $links API的URL地址。 + * + * @return $this + */ + public function setLinks($links) + { + $this->container['links'] = $links; + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + diff --git a/Services/Smn/V2/Region/SmnRegion.php b/Services/Smn/V2/Region/SmnRegion.php new file mode 100755 index 0000000..952878e --- /dev/null +++ b/Services/Smn/V2/Region/SmnRegion.php @@ -0,0 +1,27 @@ +"ae-ad-1",); + + public static function valueOf($regionId) + { + try { + if (null == $regionId) { + throw new InvalidArgumentException("Unexpected empty parameter: regionId."); + } + $endpoint = array_search($regionId, self::$REGION); + if (!$endpoint) { + throw new InvalidArgumentException("Unexpected regionId: " . $regionId); + } + return new Region($regionId, $endpoint); + } catch (InvalidArgumentException $e) { + $msg = $e->getMessage(); + echo "\n" . $msg . "\n"; + } + } +} \ No newline at end of file diff --git a/Services/Smn/V2/SmnAsyncClient.php b/Services/Smn/V2/SmnAsyncClient.php new file mode 100755 index 0000000..4a7b526 --- /dev/null +++ b/Services/Smn/V2/SmnAsyncClient.php @@ -0,0 +1,2659 @@ +modelPackage = ModelInterface::class; + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + public static function newBuilder() + { + return new ClientBuilder(new SmnAsyncClient()); + } + + /** + * 订阅 + * + * 为指定Topic添加一个订阅者,如果订阅者的状态为未确认,则向订阅者发送一个确认的消息。待订阅者进行ConfirmSubscription确认后,该订阅者才能收到Topic发布的消息。单Topic默认可添加10000个订阅者,高并发场景下,可能会出现订阅者数量超过10000仍添加成功的情况,此为正常现象。接口是幂等的,如果添加已存在的订阅者,则返回成功,且status code为200,否则status code为201。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function addSubscriptionAsync($request) + { + return $this->addSubscriptionAsyncWithHttpInfo($request); + } + + public function addSubscriptionAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\AddSubscriptionResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\AddSubscriptionRequest', + $asyncRequest = true); + } + + /** + * 批量添加删除资源标签 + * + * 为指定实例批量添加或删除标签。一个资源上最多有10个标签。 + * 此接口为幂等接口:创建时如果请求体中存在重复key则报错。 + * 创建时,不允许重复key,如果数据库存在就覆盖。 + * 删除时,如果删除的标签不存在,默认处理成功,删除时不对标签字符集范围做校验。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchCreateOrDeleteResourceTagsAsync($request) + { + return $this->batchCreateOrDeleteResourceTagsAsyncWithHttpInfo($request); + } + + public function batchCreateOrDeleteResourceTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\BatchCreateOrDeleteResourceTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\BatchCreateOrDeleteResourceTagsRequest', + $asyncRequest = true); + } + + /** + * 取消订阅 + * + * 删除指定的订阅者。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function cancelSubscriptionAsync($request) + { + return $this->cancelSubscriptionAsyncWithHttpInfo($request); + } + + public function cancelSubscriptionAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/subscriptions/{subscription_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['subscriptionUrn'] !== null) { + $pathParams['subscription_urn'] = $localVarParams['subscriptionUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CancelSubscriptionResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\CancelSubscriptionRequest', + $asyncRequest = true); + } + + /** + * 创建消息模板 + * + * 创建一个模板,用户可以按照模板去发送消息,这样可以减少请求的数据量。 + * 单用户默认可创建100个消息模板,高并发场景下,可能会出现消息模板数量超过100仍创建成功的情况,此为正常现象。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createMessageTemplateAsync($request) + { + return $this->createMessageTemplateAsyncWithHttpInfo($request); + } + + public function createMessageTemplateAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/message_template'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateMessageTemplateResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateMessageTemplateRequest', + $asyncRequest = true); + } + + /** + * 添加资源标签 + * + * 一个资源上最多有10个标签。此接口为幂等接口:创建时,如果创建的标签已经存在(key相同),则覆盖。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createResourceTagAsync($request) + { + return $this->createResourceTagAsyncWithHttpInfo($request); + } + + public function createResourceTagAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateResourceTagResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequest', + $asyncRequest = true); + } + + /** + * 创建主题 + * + * 创建Topic,单用户默认配额为3000。高并发场景下,可能会出现Topic数量超过3000仍创建成功的情况,此为正常现象。 + * 接口是幂等的,接口调用返回成功时,若已存在同名的Topic,返回的status code为200,否则返回的status code为201 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createTopicAsync($request) + { + return $this->createTopicAsyncWithHttpInfo($request); + } + + public function createTopicAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateTopicResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateTopicRequest', + $asyncRequest = true); + } + + /** + * 删除消息模板 + * + * 删除消息模板。删除模板之前的消息请求都可以使用该模板发送,删除之后无法再使用该模板发送消息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteMessageTemplateAsync($request) + { + return $this->deleteMessageTemplateAsyncWithHttpInfo($request); + } + + public function deleteMessageTemplateAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/message_template/{message_template_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['messageTemplateId'] !== null) { + $pathParams['message_template_id'] = $localVarParams['messageTemplateId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteMessageTemplateResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteMessageTemplateRequest', + $asyncRequest = true); + } + + /** + * 删除资源标签 + * + * 幂等接口:删除时,不对标签做校验。删除的key不存在报404,key不能为空或者空字符串。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteResourceTagAsync($request) + { + return $this->deleteResourceTagAsyncWithHttpInfo($request); + } + + public function deleteResourceTagAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags/{key}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + if ($localVarParams['key'] !== null) { + $pathParams['key'] = $localVarParams['key']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteResourceTagResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteResourceTagRequest', + $asyncRequest = true); + } + + /** + * 删除主题 + * + * 删除主题。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteTopicAsync($request) + { + return $this->deleteTopicAsyncWithHttpInfo($request); + } + + public function deleteTopicAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicRequest', + $asyncRequest = true); + } + + /** + * 删除指定名称的主题策略 + * + * 删除指定名称的主题策略。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteTopicAttributeByNameAsync($request) + { + return $this->deleteTopicAttributeByNameAsyncWithHttpInfo($request); + } + + public function deleteTopicAttributeByNameAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes/{name}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['name'] !== null) { + $pathParams['name'] = $localVarParams['name']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributeByNameResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributeByNameRequest', + $asyncRequest = true); + } + + /** + * 删除所有主题策略 + * + * 删除所有主题策略。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteTopicAttributesAsync($request) + { + return $this->deleteTopicAttributesAsyncWithHttpInfo($request); + } + + public function deleteTopicAttributesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributesRequest', + $asyncRequest = true); + } + + /** + * 查询消息模板详情 + * + * 查询模板详情,包括模板内容。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listMessageTemplateDetailsAsync($request) + { + return $this->listMessageTemplateDetailsAsyncWithHttpInfo($request); + } + + public function listMessageTemplateDetailsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/message_template/{message_template_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['messageTemplateId'] !== null) { + $pathParams['message_template_id'] = $localVarParams['messageTemplateId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplateDetailsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplateDetailsRequest', + $asyncRequest = true); + } + + /** + * 查询消息模板列表 + * + * 分页查询模板列表,模板列表按照创建时间进行升序排列。分页查询可以指定offset以及limit。如果不存在模板,则返回空列表。额外的查询参数分别有message_template_name和protocol。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listMessageTemplatesAsync($request) + { + return $this->listMessageTemplatesAsyncWithHttpInfo($request); + } + + public function listMessageTemplatesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/message_template'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['messageTemplateName'] !== null) { + $queryParams['message_template_name'] = $localVarParams['messageTemplateName']; + } + if ($localVarParams['protocol'] !== null) { + $queryParams['protocol'] = $localVarParams['protocol']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplatesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplatesRequest', + $asyncRequest = true); + } + + /** + * 查询项目标签 + * + * 查询租户在指定Region和实例类型的所有标签集合。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listProjectTagsAsync($request) + { + return $this->listProjectTagsAsyncWithHttpInfo($request); + } + + public function listProjectTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/{resource_type}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListProjectTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListProjectTagsRequest', + $asyncRequest = true); + } + + /** + * 查询资源实例 + * + * 使用标签过滤实例。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listResourceInstancesAsync($request) + { + return $this->listResourceInstancesAsyncWithHttpInfo($request); + } + + public function listResourceInstancesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/{resource_type}/resource_instances/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListResourceInstancesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListResourceInstancesRequest', + $asyncRequest = true); + } + + /** + * 查询资源标签 + * + * 查询指定实例的标签信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listResourceTagsAsync($request) + { + return $this->listResourceTagsAsyncWithHttpInfo($request); + } + + public function listResourceTagsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListResourceTagsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListResourceTagsRequest', + $asyncRequest = true); + } + + /** + * 查询订阅者列表 + * + * 分页返回请求者的所有的订阅列表,订阅列表按照订阅创建时间进行升序排列。分页查询可以指定offset以及limit。如果订阅者不存在,返回空列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listSubscriptionsAsync($request) + { + return $this->listSubscriptionsAsyncWithHttpInfo($request); + } + + public function listSubscriptionsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['protocol'] !== null) { + $queryParams['protocol'] = $localVarParams['protocol']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['endpoint'] !== null) { + $queryParams['endpoint'] = $localVarParams['endpoint']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsRequest', + $asyncRequest = true); + } + + /** + * 查询指定Topic的订阅者列表 + * + * 分页获取特定Topic的订阅列表,订阅列表按照订阅创建时间进行升序排列。分页查询可以指定offset以及limit。如果指定Topic不存在订阅者,返回空列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listSubscriptionsByTopicAsync($request) + { + return $this->listSubscriptionsByTopicAsyncWithHttpInfo($request); + } + + public function listSubscriptionsByTopicAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsByTopicResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsByTopicRequest', + $asyncRequest = true); + } + + /** + * 查询主题策略 + * + * 查询主题的策略信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTopicAttributesAsync($request) + { + return $this->listTopicAttributesAsyncWithHttpInfo($request); + } + + public function listTopicAttributesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListTopicAttributesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListTopicAttributesRequest', + $asyncRequest = true); + } + + /** + * 查询主题详情 + * + * 查询Topic的详细信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTopicDetailsAsync($request) + { + return $this->listTopicDetailsAsyncWithHttpInfo($request); + } + + public function listTopicDetailsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListTopicDetailsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListTopicDetailsRequest', + $asyncRequest = true); + } + + /** + * 查询主题列表 + * + * 分页查询Topic列表,Topic列表按照Topic创建时间进行降序排列。分页查询可以指定offset以及limit。如果不存在Topic,则返回空列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTopicsAsync($request) + { + return $this->listTopicsAsyncWithHttpInfo($request); + } + + public function listTopicsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['enterpriseProjectId'] !== null) { + $queryParams['enterprise_project_id'] = $localVarParams['enterpriseProjectId']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['fuzzyName'] !== null) { + $queryParams['fuzzy_name'] = $localVarParams['fuzzyName']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListTopicsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListTopicsRequest', + $asyncRequest = true); + } + + /** + * 查询SMN API V2版本信息 + * + * 查询SMN API V2版本信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listVersionAsync($request) + { + return $this->listVersionAsyncWithHttpInfo($request); + } + + public function listVersionAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/{api_version}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['apiVersion'] !== null) { + $pathParams['api_version'] = $localVarParams['apiVersion']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListVersionResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListVersionRequest', + $asyncRequest = true); + } + + /** + * 查询SMN支持的API版本号信息 + * + * 查询SMN开放API支持的版本号。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listVersionsAsync($request) + { + return $this->listVersionsAsyncWithHttpInfo($request); + } + + public function listVersionsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListVersionsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListVersionsRequest', + $asyncRequest = true); + } + + /** + * 消息发布 + * + * 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。三种消息发送方式 + * + * message + * + * message_structure + * + * message_template_name + * + * 只需要设置其中一个,如果同时设置,生效的优先级为 + * message_structure > message_template_name > message。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function publishMessageAsync($request) + { + return $this->publishMessageAsyncWithHttpInfo($request); + } + + public function publishMessageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/publish'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json;charset=UTF-8', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json;charset=UTF-8', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\PublishMessageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\PublishMessageRequest', + $asyncRequest = true); + } + + /** + * 更新消息模板 + * + * 修改消息模板的内容。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateMessageTemplateAsync($request) + { + return $this->updateMessageTemplateAsyncWithHttpInfo($request); + } + + public function updateMessageTemplateAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/message_template/{message_template_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['messageTemplateId'] !== null) { + $pathParams['message_template_id'] = $localVarParams['messageTemplateId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateMessageTemplateResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateMessageTemplateRequest', + $asyncRequest = true); + } + + /** + * 更新主题 + * + * 更新显示名。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateTopicAsync($request) + { + return $this->updateTopicAsyncWithHttpInfo($request); + } + + public function updateTopicAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicRequest', + $asyncRequest = true); + } + + /** + * 更新主题策略 + * + * 更新主题的策略信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateTopicAttributeAsync($request) + { + return $this->updateTopicAttributeAsyncWithHttpInfo($request); + } + + public function updateTopicAttributeAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes/{name}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['name'] !== null) { + $pathParams['name'] = $localVarParams['name']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicAttributeResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicAttributeRequest', + $asyncRequest = true); + } + + /** + * 创建Application + * + * 创建平台应用。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createApplicationAsync($request) + { + return $this->createApplicationAsyncWithHttpInfo($request); + } + + public function createApplicationAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/applications'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationRequest', + $asyncRequest = true); + } + + /** + * 删除Application + * + * 删除平台应用。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteApplicationAsync($request) + { + return $this->deleteApplicationAsyncWithHttpInfo($request); + } + + public function deleteApplicationAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationRequest', + $asyncRequest = true); + } + + /** + * 查询Application属性 + * + * 获取应用平台属性。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplicationAttributesAsync($request) + { + return $this->listApplicationAttributesAsyncWithHttpInfo($request); + } + + public function listApplicationAttributesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationAttributesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationAttributesRequest', + $asyncRequest = true); + } + + /** + * 查询Application + * + * 查询应用平台列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplicationsAsync($request) + { + return $this->listApplicationsAsyncWithHttpInfo($request); + } + + public function listApplicationsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/applications'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['platform'] = $localVarParams['platform']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationsRequest', + $asyncRequest = true); + } + + /** + * App消息发布 + * + * 将消息直发给endpoint设备。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function publishAppMessageAsync($request) + { + return $this->publishAppMessageAsyncWithHttpInfo($request); + } + + public function publishAppMessageAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}/publish'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\PublishAppMessageResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\PublishAppMessageRequest', + $asyncRequest = true); + } + + /** + * 更新Application + * + * 更新应用平台。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateApplicationAsync($request) + { + return $this->updateApplicationAsyncWithHttpInfo($request); + } + + public function updateApplicationAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationRequest', + $asyncRequest = true); + } + + /** + * 创建Application endpoint + * + * 创建应用平台的endpoint终端。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createApplicationEndpointAsync($request) + { + return $this->createApplicationEndpointAsyncWithHttpInfo($request); + } + + public function createApplicationEndpointAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}/endpoints'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationEndpointResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationEndpointRequest', + $asyncRequest = true); + } + + /** + * 删除Application endpoint + * + * 删除设备。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteApplicationEndpointAsync($request) + { + return $this->deleteApplicationEndpointAsyncWithHttpInfo($request); + } + + public function deleteApplicationEndpointAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationEndpointResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationEndpointRequest', + $asyncRequest = true); + } + + /** + * 查询Application的Endpoint属性 + * + * 获取endpoint的属性。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplicationEndpointAttributesAsync($request) + { + return $this->listApplicationEndpointAttributesAsyncWithHttpInfo($request); + } + + public function listApplicationEndpointAttributesAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointAttributesResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointAttributesRequest', + $asyncRequest = true); + } + + /** + * 查询Application的Endpoint列表 + * + * 查询平台的endpoint列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplicationEndpointsAsync($request) + { + return $this->listApplicationEndpointsAsyncWithHttpInfo($request); + } + + public function listApplicationEndpointsAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}/endpoints'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['enabled'] !== null) { + $queryParams['enabled'] = $localVarParams['enabled']; + } + if ($localVarParams['token'] !== null) { + $queryParams['token'] = $localVarParams['token']; + } + if ($localVarParams['userData'] !== null) { + $queryParams['user_data'] = $localVarParams['userData']; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointsResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointsRequest', + $asyncRequest = true); + } + + /** + * 更新Application endpoint + * + * 更新设备属性。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateApplicationEndpointAsync($request) + { + return $this->updateApplicationEndpointAsyncWithHttpInfo($request); + } + + public function updateApplicationEndpointAsyncWithHttpInfo($request){ + $collection_formats = []; + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationEndpointResponse', + $collectionFormats=$collection_formats, + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationEndpointRequest', + $asyncRequest = true); + } + + protected function callApi( + $method, + $resourcePath, + $pathParams=null, + $queryParams=null, + $headerParams=null, + $body=null, + $multipart=null, + $postParams=null, + $responseType=null, + $collectionFormats=null, + $requestType=null, + $asyncRequest = null) + { + return $this->doHttpRequest( + $method, + $resourcePath, + $pathParams, + $queryParams, + $headerParams, + $body, + $multipart, + $postParams, + $responseType, + $collectionFormats, + $requestType, + $asyncRequest); + } +} \ No newline at end of file diff --git a/Services/Smn/V2/SmnClient.php b/Services/Smn/V2/SmnClient.php new file mode 100755 index 0000000..24df1ad --- /dev/null +++ b/Services/Smn/V2/SmnClient.php @@ -0,0 +1,2542 @@ +modelPackage = ModelInterface::class; + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + public static function newBuilder() + { + return new ClientBuilder(new SmnClient()); + } + + + /** + * 订阅 + * + * 为指定Topic添加一个订阅者,如果订阅者的状态为未确认,则向订阅者发送一个确认的消息。待订阅者进行ConfirmSubscription确认后,该订阅者才能收到Topic发布的消息。单Topic默认可添加10000个订阅者,高并发场景下,可能会出现订阅者数量超过10000仍添加成功的情况,此为正常现象。接口是幂等的,如果添加已存在的订阅者,则返回成功,且status code为200,否则status code为201。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function addSubscription($request) + { + return $this->addSubscriptionWithHttpInfo($request); + } + + public function addSubscriptionWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\AddSubscriptionResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\AddSubscriptionRequest'); + } + + /** + * 批量添加删除资源标签 + * + * 为指定实例批量添加或删除标签。一个资源上最多有10个标签。 + * 此接口为幂等接口:创建时如果请求体中存在重复key则报错。 + * 创建时,不允许重复key,如果数据库存在就覆盖。 + * 删除时,如果删除的标签不存在,默认处理成功,删除时不对标签字符集范围做校验。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function batchCreateOrDeleteResourceTags($request) + { + return $this->batchCreateOrDeleteResourceTagsWithHttpInfo($request); + } + + public function batchCreateOrDeleteResourceTagsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\BatchCreateOrDeleteResourceTagsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\BatchCreateOrDeleteResourceTagsRequest'); + } + + /** + * 取消订阅 + * + * 删除指定的订阅者。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function cancelSubscription($request) + { + return $this->cancelSubscriptionWithHttpInfo($request); + } + + public function cancelSubscriptionWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/subscriptions/{subscription_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['subscriptionUrn'] !== null) { + $pathParams['subscription_urn'] = $localVarParams['subscriptionUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CancelSubscriptionResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\CancelSubscriptionRequest'); + } + + /** + * 创建消息模板 + * + * 创建一个模板,用户可以按照模板去发送消息,这样可以减少请求的数据量。 + * 单用户默认可创建100个消息模板,高并发场景下,可能会出现消息模板数量超过100仍创建成功的情况,此为正常现象。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createMessageTemplate($request) + { + return $this->createMessageTemplateWithHttpInfo($request); + } + + public function createMessageTemplateWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/message_template'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateMessageTemplateResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateMessageTemplateRequest'); + } + + /** + * 添加资源标签 + * + * 一个资源上最多有10个标签。此接口为幂等接口:创建时,如果创建的标签已经存在(key相同),则覆盖。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createResourceTag($request) + { + return $this->createResourceTagWithHttpInfo($request); + } + + public function createResourceTagWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateResourceTagResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateResourceTagRequest'); + } + + /** + * 创建主题 + * + * 创建Topic,单用户默认配额为3000。高并发场景下,可能会出现Topic数量超过3000仍创建成功的情况,此为正常现象。 + * 接口是幂等的,接口调用返回成功时,若已存在同名的Topic,返回的status code为200,否则返回的status code为201 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createTopic($request) + { + return $this->createTopicWithHttpInfo($request); + } + + public function createTopicWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateTopicResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateTopicRequest'); + } + + /** + * 删除消息模板 + * + * 删除消息模板。删除模板之前的消息请求都可以使用该模板发送,删除之后无法再使用该模板发送消息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteMessageTemplate($request) + { + return $this->deleteMessageTemplateWithHttpInfo($request); + } + + public function deleteMessageTemplateWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/message_template/{message_template_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['messageTemplateId'] !== null) { + $pathParams['message_template_id'] = $localVarParams['messageTemplateId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteMessageTemplateResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteMessageTemplateRequest'); + } + + /** + * 删除资源标签 + * + * 幂等接口:删除时,不对标签做校验。删除的key不存在报404,key不能为空或者空字符串。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteResourceTag($request) + { + return $this->deleteResourceTagWithHttpInfo($request); + } + + public function deleteResourceTagWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags/{key}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + if ($localVarParams['key'] !== null) { + $pathParams['key'] = $localVarParams['key']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteResourceTagResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteResourceTagRequest'); + } + + /** + * 删除主题 + * + * 删除主题。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteTopic($request) + { + return $this->deleteTopicWithHttpInfo($request); + } + + public function deleteTopicWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicRequest'); + } + + /** + * 删除指定名称的主题策略 + * + * 删除指定名称的主题策略。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteTopicAttributeByName($request) + { + return $this->deleteTopicAttributeByNameWithHttpInfo($request); + } + + public function deleteTopicAttributeByNameWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes/{name}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['name'] !== null) { + $pathParams['name'] = $localVarParams['name']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributeByNameResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributeByNameRequest'); + } + + /** + * 删除所有主题策略 + * + * 删除所有主题策略。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteTopicAttributes($request) + { + return $this->deleteTopicAttributesWithHttpInfo($request); + } + + public function deleteTopicAttributesWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributesResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteTopicAttributesRequest'); + } + + /** + * 查询消息模板详情 + * + * 查询模板详情,包括模板内容。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listMessageTemplateDetails($request) + { + return $this->listMessageTemplateDetailsWithHttpInfo($request); + } + + public function listMessageTemplateDetailsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/message_template/{message_template_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['messageTemplateId'] !== null) { + $pathParams['message_template_id'] = $localVarParams['messageTemplateId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplateDetailsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplateDetailsRequest'); + } + + /** + * 查询消息模板列表 + * + * 分页查询模板列表,模板列表按照创建时间进行升序排列。分页查询可以指定offset以及limit。如果不存在模板,则返回空列表。额外的查询参数分别有message_template_name和protocol。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listMessageTemplates($request) + { + return $this->listMessageTemplatesWithHttpInfo($request); + } + + public function listMessageTemplatesWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/message_template'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['messageTemplateName'] !== null) { + $queryParams['message_template_name'] = $localVarParams['messageTemplateName']; + } + if ($localVarParams['protocol'] !== null) { + $queryParams['protocol'] = $localVarParams['protocol']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplatesResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListMessageTemplatesRequest'); + } + + /** + * 查询项目标签 + * + * 查询租户在指定Region和实例类型的所有标签集合。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listProjectTags($request) + { + return $this->listProjectTagsWithHttpInfo($request); + } + + public function listProjectTagsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/{resource_type}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListProjectTagsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListProjectTagsRequest'); + } + + /** + * 查询资源实例 + * + * 使用标签过滤实例。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listResourceInstances($request) + { + return $this->listResourceInstancesWithHttpInfo($request); + } + + public function listResourceInstancesWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/{resource_type}/resource_instances/action'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListResourceInstancesResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListResourceInstancesRequest'); + } + + /** + * 查询资源标签 + * + * 查询指定实例的标签信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listResourceTags($request) + { + return $this->listResourceTagsWithHttpInfo($request); + } + + public function listResourceTagsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/{resource_type}/{resource_id}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['resourceType'] !== null) { + $pathParams['resource_type'] = $localVarParams['resourceType']; + } + if ($localVarParams['resourceId'] !== null) { + $pathParams['resource_id'] = $localVarParams['resourceId']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListResourceTagsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListResourceTagsRequest'); + } + + /** + * 查询订阅者列表 + * + * 分页返回请求者的所有的订阅列表,订阅列表按照订阅创建时间进行升序排列。分页查询可以指定offset以及limit。如果订阅者不存在,返回空列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listSubscriptions($request) + { + return $this->listSubscriptionsWithHttpInfo($request); + } + + public function listSubscriptionsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['protocol'] !== null) { + $queryParams['protocol'] = $localVarParams['protocol']; + } + if ($localVarParams['status'] !== null) { + $queryParams['status'] = $localVarParams['status']; + } + if ($localVarParams['endpoint'] !== null) { + $queryParams['endpoint'] = $localVarParams['endpoint']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsRequest'); + } + + /** + * 查询指定Topic的订阅者列表 + * + * 分页获取特定Topic的订阅列表,订阅列表按照订阅创建时间进行升序排列。分页查询可以指定offset以及limit。如果指定Topic不存在订阅者,返回空列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listSubscriptionsByTopic($request) + { + return $this->listSubscriptionsByTopicWithHttpInfo($request); + } + + public function listSubscriptionsByTopicWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsByTopicResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListSubscriptionsByTopicRequest'); + } + + /** + * 查询主题策略 + * + * 查询主题的策略信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTopicAttributes($request) + { + return $this->listTopicAttributesWithHttpInfo($request); + } + + public function listTopicAttributesWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListTopicAttributesResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListTopicAttributesRequest'); + } + + /** + * 查询主题详情 + * + * 查询Topic的详细信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTopicDetails($request) + { + return $this->listTopicDetailsWithHttpInfo($request); + } + + public function listTopicDetailsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListTopicDetailsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListTopicDetailsRequest'); + } + + /** + * 查询主题列表 + * + * 分页查询Topic列表,Topic列表按照Topic创建时间进行降序排列。分页查询可以指定offset以及limit。如果不存在Topic,则返回空列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listTopics($request) + { + return $this->listTopicsWithHttpInfo($request); + } + + public function listTopicsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['enterpriseProjectId'] !== null) { + $queryParams['enterprise_project_id'] = $localVarParams['enterpriseProjectId']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['fuzzyName'] !== null) { + $queryParams['fuzzy_name'] = $localVarParams['fuzzyName']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListTopicsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListTopicsRequest'); + } + + /** + * 查询SMN API V2版本信息 + * + * 查询SMN API V2版本信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listVersion($request) + { + return $this->listVersionWithHttpInfo($request); + } + + public function listVersionWithHttpInfo($request) + { + $resourcePath = '/{api_version}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['apiVersion'] !== null) { + $pathParams['api_version'] = $localVarParams['apiVersion']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListVersionResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListVersionRequest'); + } + + /** + * 查询SMN支持的API版本号信息 + * + * 查询SMN开放API支持的版本号。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listVersions($request) + { + return $this->listVersionsWithHttpInfo($request); + } + + public function listVersionsWithHttpInfo($request) + { + $resourcePath = '/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListVersionsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListVersionsRequest'); + } + + /** + * 消息发布 + * + * 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。三种消息发送方式 + * + * message + * + * message_structure + * + * message_template_name + * + * 只需要设置其中一个,如果同时设置,生效的优先级为 + * message_structure > message_template_name > message。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function publishMessage($request) + { + return $this->publishMessageWithHttpInfo($request); + } + + public function publishMessageWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/publish'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json;charset=UTF-8', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json;charset=UTF-8', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\PublishMessageResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\PublishMessageRequest'); + } + + /** + * 更新消息模板 + * + * 修改消息模板的内容。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateMessageTemplate($request) + { + return $this->updateMessageTemplateWithHttpInfo($request); + } + + public function updateMessageTemplateWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/message_template/{message_template_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['messageTemplateId'] !== null) { + $pathParams['message_template_id'] = $localVarParams['messageTemplateId']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateMessageTemplateResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateMessageTemplateRequest'); + } + + /** + * 更新主题 + * + * 更新显示名。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateTopic($request) + { + return $this->updateTopicWithHttpInfo($request); + } + + public function updateTopicWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicRequest'); + } + + /** + * 更新主题策略 + * + * 更新主题的策略信息。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateTopicAttribute($request) + { + return $this->updateTopicAttributeWithHttpInfo($request); + } + + public function updateTopicAttributeWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/topics/{topic_urn}/attributes/{name}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['topicUrn'] !== null) { + $pathParams['topic_urn'] = $localVarParams['topicUrn']; + } + if ($localVarParams['name'] !== null) { + $pathParams['name'] = $localVarParams['name']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicAttributeResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateTopicAttributeRequest'); + } + + /** + * 创建Application + * + * 创建平台应用。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createApplication($request) + { + return $this->createApplicationWithHttpInfo($request); + } + + public function createApplicationWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/applications'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationRequest'); + } + + /** + * 删除Application + * + * 删除平台应用。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteApplication($request) + { + return $this->deleteApplicationWithHttpInfo($request); + } + + public function deleteApplicationWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationRequest'); + } + + /** + * 查询Application属性 + * + * 获取应用平台属性。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplicationAttributes($request) + { + return $this->listApplicationAttributesWithHttpInfo($request); + } + + public function listApplicationAttributesWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationAttributesResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationAttributesRequest'); + } + + /** + * 查询Application + * + * 查询应用平台列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplications($request) + { + return $this->listApplicationsWithHttpInfo($request); + } + + public function listApplicationsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/applications'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['name'] !== null) { + $queryParams['name'] = $localVarParams['name']; + } + if ($localVarParams['platform'] !== null) { + $queryParams['platform'] = $localVarParams['platform']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationsRequest'); + } + + /** + * App消息发布 + * + * 将消息直发给endpoint设备。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function publishAppMessage($request) + { + return $this->publishAppMessageWithHttpInfo($request); + } + + public function publishAppMessageWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}/publish'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\PublishAppMessageResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\PublishAppMessageRequest'); + } + + /** + * 更新Application + * + * 更新应用平台。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateApplication($request) + { + return $this->updateApplicationWithHttpInfo($request); + } + + public function updateApplicationWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationRequest'); + } + + /** + * 创建Application endpoint + * + * 创建应用平台的endpoint终端。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function createApplicationEndpoint($request) + { + return $this->createApplicationEndpointWithHttpInfo($request); + } + + public function createApplicationEndpointWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}/endpoints'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='POST', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationEndpointResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\CreateApplicationEndpointRequest'); + } + + /** + * 删除Application endpoint + * + * 删除设备。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function deleteApplicationEndpoint($request) + { + return $this->deleteApplicationEndpointWithHttpInfo($request); + } + + public function deleteApplicationEndpointWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='DELETE', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationEndpointResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\DeleteApplicationEndpointRequest'); + } + + /** + * 查询Application的Endpoint属性 + * + * 获取endpoint的属性。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplicationEndpointAttributes($request) + { + return $this->listApplicationEndpointAttributesWithHttpInfo($request); + } + + public function listApplicationEndpointAttributesWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointAttributesResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointAttributesRequest'); + } + + /** + * 查询Application的Endpoint列表 + * + * 查询平台的endpoint列表。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function listApplicationEndpoints($request) + { + return $this->listApplicationEndpointsWithHttpInfo($request); + } + + public function listApplicationEndpointsWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/applications/{application_urn}/endpoints'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['offset'] !== null) { + $queryParams['offset'] = $localVarParams['offset']; + } + if ($localVarParams['limit'] !== null) { + $queryParams['limit'] = $localVarParams['limit']; + } + if ($localVarParams['enabled'] !== null) { + $queryParams['enabled'] = $localVarParams['enabled']; + } + if ($localVarParams['token'] !== null) { + $queryParams['token'] = $localVarParams['token']; + } + if ($localVarParams['userData'] !== null) { + $queryParams['user_data'] = $localVarParams['userData']; + } + if ($localVarParams['applicationUrn'] !== null) { + $pathParams['application_urn'] = $localVarParams['applicationUrn']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*', 'application/json'], + [] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='GET', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointsResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\ListApplicationEndpointsRequest'); + } + + /** + * 更新Application endpoint + * + * 更新设备属性。 + * + * Please refer to G42 cloud API Explorer for details. + * + * @param $request 请求对象 + * @return response + */ + public function updateApplicationEndpoint($request) + { + return $this->updateApplicationEndpointWithHttpInfo($request); + } + + public function updateApplicationEndpointWithHttpInfo($request) + { + $resourcePath = '/v2/{project_id}/notifications/endpoints/{endpoint_urn}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $pathParams = []; + $httpBody = null; + $multipart = false; + $localVarParams = []; + $arr = $request::attributeMap(); + foreach ($arr as $k => $v) { + $getter = $request::getters()[$k]; + $value = $request->$getter(); + $localVarParams[$k] = $value; + } + if ($localVarParams['endpointUrn'] !== null) { + $pathParams['endpoint_urn'] = $localVarParams['endpointUrn']; + } + if ($localVarParams['body'] !== null) { + $httpBody= $localVarParams['body']; + } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json;charset=UTF-8'] + ); + } + $headers = array_merge( + $headerParams, + $headers + ); + + return $this->callApi( + $method='PUT', + $resourcePath, + $pathParams, + $queryParams, + $headerParams=$headers, + $body=$httpBody, + $multipart = $multipart, + $postParams=$formParams, + $responseType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationEndpointResponse', + $requestType='\G42Cloud\SDK\Smn\V2\Model\UpdateApplicationEndpointRequest'); + } + + protected function callApi( + $method, + $resourcePath, + $pathParams = null, + $queryParams = null, + $headerParams = null, + $body = null, + $multipart = null, + $postParams = null, + $responseType = null, + $requestType = null) + { + return $this->doHttpRequest( + $method, + $resourcePath, + $pathParams, + $queryParams, + $headerParams, + $body, + $multipart, + $postParams, + $responseType, + $requestType); + } +} \ No newline at end of file diff --git a/Services/Smn/composer.json b/Services/Smn/composer.json new file mode 100755 index 0000000..bf32988 --- /dev/null +++ b/Services/Smn/composer.json @@ -0,0 +1,30 @@ +{ + "name": "g42cloud/g42cloud-sdk-smn", + "description": "G42CLOUD SDK SMN", + "keywords": [ + "php", + "sdk", + "rest", + "api", + "smn" + ], + "version": "0.0.2-beta", + "type": "library", + "license": "Apache-2.0", + "authors": [ + { + "name": "G42Cloud_SDK", + "email": "unionsdk@outlook.com", + "homepage": "https://github.com/g42cloud-sdk/g42cloud-sdk-php" + } + ], + "minimum-stability": "dev", + "require": { + "g42cloud/cloud-sdk-core": "0.0.2-beta" + }, + "autoload": { + "psr-4": { + "G42Cloud\\SDK\\Smn\\V3\\": "V3/" + } + } +} diff --git a/Services/Vpc/composer.json b/Services/Vpc/composer.json index 25bf6b3..90d9f8b 100755 --- a/Services/Vpc/composer.json +++ b/Services/Vpc/composer.json @@ -8,7 +8,7 @@ "api", "vpc" ], - "version": "0.0.1-beta", + "version": "0.0.2-beta", "type": "library", "license": "Apache-2.0", "authors": [ @@ -20,7 +20,7 @@ ], "minimum-stability": "dev", "require": { - "g42cloud/cloud-sdk-core": "0.0.1-beta" + "g42cloud/cloud-sdk-core": "0.0.2-beta" }, "autoload": { "psr-4": { diff --git a/composer.json b/composer.json index 0644bff..2b923a2 100755 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "rest", "api" ], - "version": "0.0.1-beta", + "version": "0.0.2-beta", "type": "library", "license": "Apache-2.0", "authors": [